Problem/Motivation
The symfony container allows to define service parameters from environment variables. (Symfony documentation on configuration and Environment Variable Processors)
However this does not work with Drupal.
Steps to reproduce
Add a service parameter like this:
parameters:
twig.config:
debug: '%env(bool:MY_TWIG_DEBUG_ENV_VARIABLE)%'
And observe the error:
In ParameterBag.php line 100:
The parameter "twig.config" has a dependency on a non-existent parameter "env(bool:MY_TWIG_DEBUG_ENV_VARIABLE)".
Proposed resolution
Use the EnvPlaceholderParameterBag and make sure environment variables are replaced correctly.
Remaining tasks
User interface changes
none
API changes
Support for environment variables in service parameters.
Data model changes
none
Release notes snippet
tbd