@@ -262,9 +262,8 @@ Symfony provides the following env var processors:
262
262
263
263
# config/packages/framework.yaml
264
264
parameters :
265
- env(TRUSTED_HOSTS) : ' ["10.0.0.1", "10.0.0.2"]'
266
- framework :
267
- trusted_hosts : ' %env(json:TRUSTED_HOSTS)%'
265
+ env(ALLOWED_LANGUAGES) : ' ["en","de","es"]'
266
+ app_allowed_languages : ' %env(json:ALLOWED_LANGUAGES)%'
268
267
269
268
.. code-block :: xml
270
269
@@ -279,10 +278,9 @@ Symfony provides the following env var processors:
279
278
https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
280
279
281
280
<parameters >
282
- <parameter key =" env(TRUSTED_HOSTS)" >["10.0.0.1", "10.0.0.2"]</parameter >
281
+ <parameter key =" env(ALLOWED_LANGUAGES)" >["en","de","es"]</parameter >
282
+ <parameter key =" app_allowed_languages" >%env(json:ALLOWED_LANGUAGES)%</parameter >
283
283
</parameters >
284
-
285
- <framework : config trusted-hosts =" %env(json:TRUSTED_HOSTS)%" />
286
284
</container >
287
285
288
286
.. code-block :: php
@@ -293,9 +291,9 @@ Symfony provides the following env var processors:
293
291
use Symfony\Component\DependencyInjection\ContainerBuilder;
294
292
use Symfony\Config\FrameworkConfig;
295
293
296
- return static function (ContainerBuilder $container, FrameworkConfig $framework ) {
297
- $container->setParameter('env(TRUSTED_HOSTS )', '["10.0.0.1", "10.0.0.2 "]');
298
- $framework->trustedHosts(env('TRUSTED_HOSTS')->json() );
294
+ return static function (ContainerBuilder $container) {
295
+ $container->setParameter('env(ALLOWED_LANGUAGES )', '["en","de","es "]');
296
+ $container->setParameter('app_allowed_languages', '%env(json:ALLOWED_LANGUAGES)%' );
299
297
};
300
298
301
299
``env(resolve:FOO) ``
@@ -348,9 +346,8 @@ Symfony provides the following env var processors:
348
346
349
347
# config/packages/framework.yaml
350
348
parameters :
351
- env(TRUSTED_HOSTS) : " 10.0.0.1,10.0.0.2"
352
- framework :
353
- trusted_hosts : ' %env(csv:TRUSTED_HOSTS)%'
349
+ env(ALLOWED_LANGUAGES) : " en,de,es"
350
+ app_allowed_languages : ' %env(csv:ALLOWED_LANGUAGES)%'
354
351
355
352
.. code-block :: xml
356
353
@@ -365,10 +362,9 @@ Symfony provides the following env var processors:
365
362
https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
366
363
367
364
<parameters >
368
- <parameter key =" env(TRUSTED_HOSTS)" >10.0.0.1,10.0.0.2</parameter >
365
+ <parameter key =" env(ALLOWED_LANGUAGES)" >en,de,es</parameter >
366
+ <parameter key =" app_allowed_languages" >%env(csv:ALLOWED_LANGUAGES)%</parameter >
369
367
</parameters >
370
-
371
- <framework : config trusted-hosts =" %env(csv:TRUSTED_HOSTS)%" />
372
368
</container >
373
369
374
370
.. code-block :: php
@@ -379,9 +375,9 @@ Symfony provides the following env var processors:
379
375
use Symfony\Component\DependencyInjection\ContainerBuilder;
380
376
use Symfony\Config\FrameworkConfig;
381
377
382
- return static function (ContainerBuilder $container, FrameworkConfig $framework ) {
383
- $container->setParameter('env(TRUSTED_HOSTS )', '10.0.0.1,10.0.0.2 ');
384
- $framework->trustedHosts(env('TRUSTED_HOSTS')->csv() );
378
+ return static function (ContainerBuilder $container) {
379
+ $container->setParameter('env(ALLOWED_LANGUAGES )', 'en,de,es ');
380
+ $container->setParameter('app_allowed_languages', '%env(csv:ALLOWED_LANGUAGES)%' );
385
381
};
386
382
387
383
``env(file:FOO) ``
0 commit comments