This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php
Nicolas Grekas 67be665c02 feature #28976 [DI] Add a "default" EnvProcessor (jderusse)
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
-------

aee4e33cdb [DI] Add a \"default\" EnvProcessor
2018-12-01 10:02:00 +01:00
..
custom_container_class_constructor_without_arguments.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
custom_container_class_with_mandatory_constructor_arguments.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
custom_container_class_with_optional_constructor_arguments.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
custom_container_class_without_constructor.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
php_with_wrong_ext.yml [DI] FileLoaders: Allow to explicit type to load 2017-01-10 12:54:54 +01:00
services1-1.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
services1.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
services8.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services9_as_files.txt Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services9_compiled.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services10.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services12.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services13.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
services19.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services24.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
services26.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services33.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
services_adawson.php [DI] fix taking lazy services into account when dumping the container 2018-11-20 15:22:20 +01:00
services_almost_circular_private.php Merge branch '4.1' 2018-11-06 18:10:56 +01:00
services_almost_circular_public.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services_array_params.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services_base64_env.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services_csv_env.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services_dedup_lazy_proxy.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
services_deep_graph.php Merge branch '4.1' 2018-11-06 18:10:56 +01:00
services_default_env.php [DI] Add a \"default\" EnvProcessor 2018-12-01 10:01:52 +01:00
services_env_in_id.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services_errored_definition.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services_inline_requires.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services_inline_self_ref.php Merge branch '4.1' 2018-11-06 18:10:56 +01:00
services_json_env.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services_locator.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
services_non_shared_lazy.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
services_private_frozen.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
services_private_in_expression.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
services_rot13_env.php Merge branch '4.1' 2018-11-20 17:22:05 +01:00
services_service_locator_argument.php [DI] minor optim for dumped container 2018-10-06 20:06:14 +02:00
services_subscriber.php [DI] minor optim for dumped container 2018-10-06 20:06:14 +02:00
services_tsantos.php Merge branch '4.1' 2018-11-06 18:10:56 +01:00
services_uninitialized_ref.php [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
simple.php moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00