@@ -446,15 +446,6 @@ Symfony provides the following env var processors:
446
446
'auth' => '%env(file:AUTH_FILE)%',
447
447
]);
448
448
449
- ``env(trim:FOO) ``
450
- Trims the content of ``FOO `` env var, removing whitespaces from the beginning
451
- and end of the string. This is especially useful in combination with the
452
- ``file `` processor, as it'll remove newlines at the end of a file.
453
-
454
- .. versionadded :: 4.3
455
-
456
- The ``trim `` processor was introduced in Symfony 4.3.
457
-
458
449
``env(key:FOO:BAR) ``
459
450
Retrieves the value associated with the key ``FOO `` from the array whose
460
451
contents are stored in the ``BAR `` env var:
@@ -493,51 +484,6 @@ Symfony provides the following env var processors:
493
484
$container->setParameter('env(SECRETS_FILE)', '/opt/application/.secrets.json');
494
485
$container->setParameter('database_password', '%env(key:database_password:json:file:SECRETS_FILE)%');
495
486
496
- ``env(default:fallback_param:BAR) ``
497
- Retrieves the value of the parameter ``fallback_param `` when the ``BAR `` env
498
- var is not available:
499
-
500
- .. configuration-block ::
501
-
502
- .. code-block :: yaml
503
-
504
- # config/services.yaml
505
- parameters :
506
- # if PRIVATE_KEY is not a valid file path, the content of raw_key is returned
507
- private_key : ' %env(default:raw_key:file:PRIVATE_KEY)%'
508
- raw_key : ' %env(PRIVATE_KEY)%'
509
-
510
- .. code-block :: xml
511
-
512
- <!-- config/services.xml -->
513
- <?xml version =" 1.0" encoding =" UTF-8" ?>
514
- <container xmlns =" http://symfony.com/schema/dic/services"
515
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
516
- xmlns : framework =" http://symfony.com/schema/dic/symfony"
517
- xsi : schemaLocation =" http://symfony.com/schema/dic/services
518
- http://symfony.com/schema/dic/services/services-1.0.xsd
519
- http://symfony.com/schema/dic/symfony
520
- http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
521
-
522
- <parameters >
523
- <!-- if PRIVATE_KEY is not a valid file path, the content of raw_key is returned -->
524
- <parameter key =" private_key" >%env(default:raw_key:file:PRIVATE_KEY)%</parameter >
525
- <parameter key =" raw_key" >%env(PRIVATE_KEY)%</parameter >
526
- </parameters >
527
- </container >
528
-
529
- .. code-block :: php
530
-
531
- // config/services.php
532
-
533
- // if PRIVATE_KEY is not a valid file path, the content of raw_key is returned
534
- $container->setParameter('private_key', '%env(default:raw_key:file:PRIVATE_KEY)%');
535
- $container->setParameter('raw_key', '%env(PRIVATE_KEY)%');
536
-
537
- .. versionadded :: 4.3
538
-
539
- The ``default `` processor was introduced in Symfony 4.3.
540
-
541
487
It is also possible to combine any number of processors:
542
488
543
489
.. code-block :: yaml
0 commit comments