Skip to content

Commit 77f390b

Browse files
Made the deprecation notice more concise
1 parent b733aea commit 77f390b

File tree

1 file changed

+5
-26
lines changed

1 file changed

+5
-26
lines changed

configuration/environment_variables.rst

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -99,32 +99,9 @@ whenever the corresponding environment variable is *not* found:
9999
100100
.. deprecated:: 4.3
101101

102-
Passing non-string values as default values for environment variables is no longer supported. Any non-string value,
103-
e.g. an integer or float must be passed as string.
104-
105-
.. code-block:: yaml
106-
107-
# config/services.yaml
108-
parameters:
109-
env(DATABASE_PORT): '3306'
110-
111-
.. code-block:: xml
112-
113-
<!-- config/services.xml -->
114-
<?xml version="1.0" encoding="UTF-8" ?>
115-
<container xmlns="http://symfony.com/schema/dic/services"
116-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
117-
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
118-
119-
<parameters>
120-
<parameter key="env(DATABASE_PORT)">3306</parameter>
121-
</parameters>
122-
</container>
123-
124-
.. code-block:: php
125-
126-
// config/services.php
127-
$container->setParameter('env(DATABASE_PORT)', '3306');
102+
Passing non-string values as default values for environment variables is
103+
deprecated since Symfony 4.3. Use :ref:`environment variable processors <env-var-processors>`
104+
if you need to transform those string default values into other data types.
128105

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

@@ -161,6 +138,8 @@ the following:
161138
:doc:`Symfony profiler </profiler>`. In practice this shouldn't be a
162139
problem because the web profiler must **never** be enabled in production.
163140

141+
.. _env-var-processors:
142+
164143
Environment Variable Processors
165144
-------------------------------
166145

0 commit comments

Comments
 (0)