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:
99
99
100
100
.. deprecated :: 4.3
101
101
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.
128
105
129
106
.. _configuration-env-var-in-prod :
130
107
@@ -161,6 +138,8 @@ the following:
161
138
:doc: `Symfony profiler </profiler >`. In practice this shouldn't be a
162
139
problem because the web profiler must **never ** be enabled in production.
163
140
141
+ .. _env-var-processors :
142
+
164
143
Environment Variable Processors
165
144
-------------------------------
166
145
You can’t perform that action at this time.
0 commit comments