File tree Expand file tree Collapse file tree 1 file changed +5
-26
lines changed Expand file tree Collapse file tree 1 file changed +5
-26
lines changed Original file line number Diff line number Diff 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+
164143Environment Variable Processors
165144-------------------------------
166145
You can’t perform that action at this time.
0 commit comments