diff --git a/configuration/environment_variables.rst b/configuration/environment_variables.rst index 50a2bd77daf..8ea248cac30 100644 --- a/configuration/environment_variables.rst +++ b/configuration/environment_variables.rst @@ -77,7 +77,7 @@ whenever the corresponding environment variable is *not* found: # config/services.yaml parameters: - env(DATABASE_HOST): localhost + env(DATABASE_HOST): 'localhost' .. code-block:: xml @@ -97,6 +97,12 @@ whenever the corresponding environment variable is *not* found: // config/services.php $container->setParameter('env(DATABASE_HOST)', 'localhost'); +.. deprecated:: 4.3 + + Passing non-string values as default values for environment variables is + deprecated since Symfony 4.3. Use :ref:`environment variable processors ` + if you need to transform those string default values into other data types. + .. _configuration-env-var-in-prod: Configuring Environment Variables in Production @@ -132,6 +138,8 @@ the following: :doc:`Symfony profiler `. In practice this shouldn't be a problem because the web profiler must **never** be enabled in production. +.. _env-var-processors: + Environment Variable Processors -------------------------------