@@ -372,6 +372,43 @@ Symfony provides the following env var processors:
372
372
and end of the string. This is especially useful in combination with the
373
373
``file `` processor, as it'll remove newlines at the end of a file.
374
374
375
+ .. configuration-block ::
376
+
377
+ .. code-block :: yaml
378
+
379
+ # config/packages/framework.yaml
380
+ parameters :
381
+ env(AUTH_FILE) : ' ../config/auth.json'
382
+ google :
383
+ auth : ' %env(trim:file:AUTH_FILE)%'
384
+
385
+ .. code-block :: xml
386
+
387
+ <!-- config/packages/framework.xml -->
388
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
389
+ <container xmlns =" http://symfony.com/schema/dic/services"
390
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
391
+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
392
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
393
+ https://symfony.com/schema/dic/services/services-1.0.xsd
394
+ http://symfony.com/schema/dic/symfony
395
+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
396
+
397
+ <parameters >
398
+ <parameter key =" env(AUTH_FILE)" >../config/auth.json</parameter >
399
+ </parameters >
400
+
401
+ <google auth =" %env(trim:file:AUTH_FILE)%" />
402
+ </container >
403
+
404
+ .. code-block :: php
405
+
406
+ // config/packages/framework.php
407
+ $container->setParameter('env(AUTH_FILE)', '../config/auth.json');
408
+ $container->loadFromExtension('google', [
409
+ 'auth' => '%env(trim:file:AUTH_FILE)%',
410
+ ]);
411
+
375
412
``env(key:FOO:BAR) ``
376
413
Retrieves the value associated with the key ``FOO `` from the array whose
377
414
contents are stored in the ``BAR `` env var:
0 commit comments