@@ -445,6 +445,51 @@ Symfony provides the following env var processors:
445445 'auth' => '%env(file:AUTH_FILE)%',
446446 ]);
447447
448+ ``env(require:FOO) ``
449+ ``require() `` the PHP file whose path is the value of the ``FOO ``
450+ env var and return the value returned from it.
451+
452+ .. configuration-block ::
453+
454+ .. code-block :: yaml
455+
456+ # config/packages/framework.yaml
457+ parameters :
458+ env(PHP_FILE) : ' ../config/.runtime-evaluated.php'
459+ app :
460+ auth : ' %env(require:PHP_FILE)%'
461+
462+ .. code-block :: xml
463+
464+ <!-- config/packages/framework.xml -->
465+ <?xml version =" 1.0" encoding =" UTF-8" ?>
466+ <container xmlns =" http://symfony.com/schema/dic/services"
467+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
468+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
469+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
470+ https://symfony.com/schema/dic/services/services-1.0.xsd
471+ http://symfony.com/schema/dic/symfony
472+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
473+
474+ <parameters >
475+ <parameter key =" env(PHP_FILE)" >../config/.runtime-evaluated.php</parameter >
476+ </parameters >
477+
478+ <app auth =" %env(require:PHP_FILE)%" />
479+ </container >
480+
481+ .. code-block :: php
482+
483+ // config/packages/framework.php
484+ $container->setParameter('env(PHP_FILE)', '../config/.runtime-evaluated.php');
485+ $container->loadFromExtension('app', [
486+ 'auth' => '%env(require:AUTH_FILE)%',
487+ ]);
488+
489+ .. versionadded :: 4.3
490+
491+ The ``require `` processor was introduced in Symfony 4.3.
492+
448493``env(trim:FOO) ``
449494 Trims the content of ``FOO `` env var, removing whitespaces from the beginning
450495 and end of the string. This is especially useful in combination with the
0 commit comments