Skip to content

Commit 945bb67

Browse files
committed
Reword
1 parent ecc8e44 commit 945bb67

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

configuration.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -598,13 +598,10 @@ configure options that depend on where the application is run (e.g. the database
598598
credentials are usually different in production versus your local machine). If
599599
the values are sensitive, you can even :doc:`encrypt them as secrets </configuration/secrets>`.
600600

601-
You can reference environment variables using the special syntax
602-
``%env(ENV_VAR_NAME)%``. The values of these options are resolved at runtime
603-
(only once per request, to not impact performance).
604-
605-
Note that not all config options are compatible with environment variables. There are
606-
`cases <https://github.com/symfony/symfony/issues/39902>`_ which may require refactoring
607-
the config definition in order to work with environment variables.
601+
Use the special syntax ``%env(ENV_VAR_NAME)%`` to reference environment variables.
602+
The values of these options are resolved at runtime (only once per request, to
603+
not impact performance) so you can change the application behavior without having
604+
to clear the cache.
608605

609606
This example shows how you could configure the database connection using an env var:
610607

@@ -677,6 +674,14 @@ To define the value of an env var, you have several options:
677674
Some hosts - like SymfonyCloud - offer easy `utilities to manage env vars`_
678675
in production.
679676

677+
.. note::
678+
679+
Some configuration features are not compatible with env vars. For example,
680+
defining some container parameters conditionally based on the existence of
681+
another configuration option. When using an env var, the configuration option
682+
always exists, because its value will be ``null`` when the related env var
683+
is not defined.
684+
680685
.. caution::
681686

682687
Beware that dumping the contents of the ``$_SERVER`` and ``$_ENV`` variables

0 commit comments

Comments
 (0)