67be665c02
This PR was squashed before being merged into the 4.3-dev branch (closes #28976).
Discussion
----------
[DI] Add a "default" EnvProcessor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | TODO
This PR add a new fallback env processor in order to return a default value when the primary processor is not able to fetch a value (env variable, file or key does not exists)
```
#
default_host: localhost
host: '%env(default:default_host:OPTIONAL_ENV_VARIABLE)%"
default_secret: this secret is not secret
secret: '%env(default:default_secret:file:THIS_FILE_ONLY_EXIST_IN_PRODUCTION)%"
default_charset: utf8
charset: '%env(default:default_charset:key:charset:json:DATABASE_CONFIG)%"
```
Commits
-------
|
||
---|---|---|
.. | ||
config | ||
Container | ||
containers | ||
directory | ||
graphviz | ||
includes | ||
ini | ||
php | ||
Prototype | ||
xml | ||
yaml | ||
array.json | ||
Bar.php | ||
BarInterface.php | ||
CaseSensitiveClass.php | ||
CustomDefinition.php | ||
DeprecatedClass.php | ||
FactoryDummy.php | ||
FooForCircularWithAddCalls.php | ||
NamedArgumentsDummy.php | ||
NamedArgumentsVariadicsDummy.php | ||
ParentNotExists.php | ||
SimilarArgumentsDummy.php | ||
StdClassDecorator.php | ||
StubbedTranslator.php | ||
TestDefinition1.php | ||
TestDefinition2.php | ||
TestDefinition3.php | ||
TestServiceSubscriber.php | ||
TestServiceSubscriberChild.php | ||
TestServiceSubscriberParent.php | ||
TestServiceSubscriberTrait.php |