@@ -251,9 +251,8 @@ Symfony provides the following env var processors:
251
251
252
252
# config/packages/framework.yaml
253
253
parameters :
254
- env(TRUSTED_HOSTS) : ' ["10.0.0.1", "10.0.0.2"]'
255
- framework :
256
- trusted_hosts : ' %env(json:TRUSTED_HOSTS)%'
254
+ env(ALLOWED_LANGUAGES) : ' ["en","de","es"]'
255
+ app_allowed_languages : ' %env(json:ALLOWED_LANGUAGES)%'
257
256
258
257
.. code-block :: xml
259
258
@@ -268,10 +267,9 @@ Symfony provides the following env var processors:
268
267
https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
269
268
270
269
<parameters >
271
- <parameter key =" env(TRUSTED_HOSTS)" >["10.0.0.1", "10.0.0.2"]</parameter >
270
+ <parameter key =" env(ALLOWED_LANGUAGES)" >["en","de","es"]</parameter >
271
+ <parameter key =" app_allowed_languages" >%env(json:ALLOWED_LANGUAGES)%</parameter >
272
272
</parameters >
273
-
274
- <framework : config trusted-hosts =" %env(json:TRUSTED_HOSTS)%" />
275
273
</container >
276
274
277
275
.. code-block :: php
@@ -282,9 +280,9 @@ Symfony provides the following env var processors:
282
280
use Symfony\Component\DependencyInjection\ContainerBuilder;
283
281
use Symfony\Config\FrameworkConfig;
284
282
285
- return static function (ContainerBuilder $container, FrameworkConfig $framework ) {
286
- $container->setParameter('env(TRUSTED_HOSTS )', '["10.0.0.1", "10.0.0.2 "]');
287
- $framework->trustedHosts(env('TRUSTED_HOSTS')->json() );
283
+ return static function (ContainerBuilder $container) {
284
+ $container->setParameter('env(ALLOWED_LANGUAGES )', '["en","de","es "]');
285
+ $container->setParameter('app_allowed_languages', '%env(json:ALLOWED_LANGUAGES)%' );
288
286
};
289
287
290
288
``env(resolve:FOO) ``
@@ -337,9 +335,8 @@ Symfony provides the following env var processors:
337
335
338
336
# config/packages/framework.yaml
339
337
parameters :
340
- env(TRUSTED_HOSTS) : " 10.0.0.1,10.0.0.2"
341
- framework :
342
- trusted_hosts : ' %env(csv:TRUSTED_HOSTS)%'
338
+ env(ALLOWED_LANGUAGES) : " en,de,es"
339
+ app_allowed_languages : ' %env(csv:ALLOWED_LANGUAGES)%'
343
340
344
341
.. code-block :: xml
345
342
@@ -354,10 +351,9 @@ Symfony provides the following env var processors:
354
351
https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
355
352
356
353
<parameters >
357
- <parameter key =" env(TRUSTED_HOSTS)" >10.0.0.1,10.0.0.2</parameter >
354
+ <parameter key =" env(ALLOWED_LANGUAGES)" >en,de,es</parameter >
355
+ <parameter key =" app_allowed_languages" >%env(csv:ALLOWED_LANGUAGES)%</parameter >
358
356
</parameters >
359
-
360
- <framework : config trusted-hosts =" %env(csv:TRUSTED_HOSTS)%" />
361
357
</container >
362
358
363
359
.. code-block :: php
@@ -368,9 +364,9 @@ Symfony provides the following env var processors:
368
364
use Symfony\Component\DependencyInjection\ContainerBuilder;
369
365
use Symfony\Config\FrameworkConfig;
370
366
371
- return static function (ContainerBuilder $container, FrameworkConfig $framework ) {
372
- $container->setParameter('env(TRUSTED_HOSTS )', '10.0.0.1,10.0.0.2 ');
373
- $framework->trustedHosts(env('TRUSTED_HOSTS')->csv() );
367
+ return static function (ContainerBuilder $container) {
368
+ $container->setParameter('env(ALLOWED_LANGUAGES )', 'en,de,es ');
369
+ $container->setParameter('app_allowed_languages', '%env(csv:ALLOWED_LANGUAGES)%' );
374
370
};
375
371
376
372
``env(shuffle:FOO) ``
0 commit comments