From d36f631bf2840bb9e05a08e06ed2408c5257cce2 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Sun, 6 Jan 2019 21:01:39 +0100 Subject: [PATCH] [DI] Document the `trim` env var processor --- configuration/external_parameters.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configuration/external_parameters.rst b/configuration/external_parameters.rst index 6afb30e10f9..3d37c83f3b8 100644 --- a/configuration/external_parameters.rst +++ b/configuration/external_parameters.rst @@ -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: