Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DI] Document the trim env var processor #10851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions configuration/external_parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,14 @@ Symfony provides the following env var processors:
'auth' => '%env(file:AUTH_FILE)%',
));

``env(trim:FOO)``
Trims the content of ``FOO`` env var, removing whitespaces from the beginning
and end of the string. This is especially useful in combination with the
``file`` processor, as it'll remove newlines at the end of a file.

.. versionadded:: 4.3
The ``trim`` processor was introduced in Symfony 4.3.

``env(key:FOO:BAR)``
Retrieves the value associated with the key ``FOO`` from the array whose
contents are stored in the ``BAR`` env var:
Expand Down