Skip to content

Commit d36f631

Browse files
committed
[DI] Document the trim env var processor
1 parent 98d4a3e commit d36f631

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

configuration/external_parameters.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,14 @@ Symfony provides the following env var processors:
451451
'auth' => '%env(file:AUTH_FILE)%',
452452
));
453453
454+
``env(trim:FOO)``
455+
Trims the content of ``FOO`` env var, removing whitespaces from the beginning
456+
and end of the string. This is especially useful in combination with the
457+
``file`` processor, as it'll remove newlines at the end of a file.
458+
459+
.. versionadded:: 4.3
460+
The ``trim`` processor was introduced in Symfony 4.3.
461+
454462
``env(key:FOO:BAR)``
455463
Retrieves the value associated with the key ``FOO`` from the array whose
456464
contents are stored in the ``BAR`` env var:

0 commit comments

Comments
 (0)