@@ -457,6 +457,7 @@ Symfony provides the following env var processors:
457
457
``file `` processor, as it'll remove newlines at the end of a file.
458
458
459
459
.. versionadded :: 4.3
460
+
460
461
The ``trim `` processor was introduced in Symfony 4.3.
461
462
462
463
``env(key:FOO:BAR) ``
@@ -498,17 +499,18 @@ Symfony provides the following env var processors:
498
499
$container->setParameter('database_password', '%env(key:database_password:json:file:SECRETS_FILE)%');
499
500
500
501
``env(default:fallback_param:BAR) ``
501
- Retrieves the value of the parameter ``fallback_param `` when the of the ``BAR `` env var is not available:
502
+ Retrieves the value of the parameter ``fallback_param `` when the ``BAR `` env
503
+ var is not available:
502
504
503
505
.. configuration-block ::
504
506
505
507
.. code-block :: yaml
506
508
507
509
# config/services.yaml
508
510
parameters :
511
+ # if PRIVATE_KEY is not a valid file path, the content of raw_key is returned
509
512
private_key : ' %env(default:raw_key:file:PRIVATE_KEY)%'
510
513
raw_key : ' %env(PRIVATE_KEY)%'
511
- # if PRIVATE_KEY is not a valid file path, the content of raw_key is returned.
512
514
513
515
.. code-block :: xml
514
516
@@ -523,6 +525,7 @@ Symfony provides the following env var processors:
523
525
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
524
526
525
527
<parameters >
528
+ <!-- if PRIVATE_KEY is not a valid file path, the content of raw_key is returned -->
526
529
<parameter key =" private_key" >%env(default:raw_key:file:PRIVATE_KEY)%</parameter >
527
530
<parameter key =" raw_key" >%env(PRIVATE_KEY)%</parameter >
528
531
</parameters >
@@ -531,10 +534,13 @@ Symfony provides the following env var processors:
531
534
.. code-block :: php
532
535
533
536
// config/services.php
537
+
538
+ // if PRIVATE_KEY is not a valid file path, the content of raw_key is returned
534
539
$container->setParameter('private_key', '%env(default:raw_key:file:PRIVATE_KEY)%');
535
540
$container->setParameter('raw_key', '%env(PRIVATE_KEY)%');
536
541
537
542
.. versionadded :: 4.3
543
+
538
544
The ``default `` processor was introduced in Symfony 4.3.
539
545
540
546
It is also possible to combine any number of processors:
0 commit comments