8000 Adds deprecation for non-string env values. by dbrumann · Pull Request #11311 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Adds deprecation for non-string env values. #11311

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 2 commits into from
Apr 6, 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
10 changes: 9 additions & 1 deletion configuration/environment_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 <env-var-processors>`
if you need to transform those string default values into other data types.

.. _configuration-env-var-in-prod:

Configuring Environment Variables in Production
Expand Down Expand Up @@ -132,6 +138,8 @@ the following:
:doc:`Symfony profiler </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
-------------------------------

Expand Down
0