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
-------
|
||
---|---|---|
.. | ||
custom_container_class_constructor_without_arguments.php | ||
custom_container_class_with_mandatory_constructor_arguments.php | ||
custom_container_class_with_optional_constructor_arguments.php | ||
custom_container_class_without_constructor.php | ||
php_with_wrong_ext.yml | ||
services1-1.php | ||
services1.php | ||
services8.php | ||
services9_as_files.txt | ||
services9_compiled.php | ||
services10.php | ||
services12.php | ||
services13.php | ||
services19.php | ||
services24.php | ||
services26.php | ||
services33.php | ||
services_adawson.php | ||
services_almost_circular_private.php | ||
services_almost_circular_public.php | ||
services_array_params.php | ||
services_base64_env.php | ||
services_csv_env.php | ||
services_dedup_lazy_proxy.php | ||
services_deep_graph.php | ||
services_default_env.php | ||
services_env_in_id.php | ||
services_errored_definition.php | ||
services_inline_requires.php | ||
services_inline_self_ref.php | ||
services_json_env.php | ||
services_locator.php | ||
services_non_shared_lazy.php | ||
services_private_frozen.php | ||
services_private_in_expression.php | ||
services_rot13_env.php | ||
services_service_locator_argument.php | ||
services_subscriber.php | ||
services_tsantos.php | ||
services_uninitialized_ref.php | ||
simple.php |