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
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
..
config [ProxyManagerBridge][DI] allow proxifying interfaces with "lazy: Some\ProxifiedInterface" 2018-07-09 16:45:45 +02:00
Container fix regression when extending the Container class without a constructor 2018-03-08 10:22:06 +01:00
containers Merge branch '4.1' 2018-11-06 18:10:56 +01:00
directory
graphviz Merge branch '3.4' into 4.1 2018-11-06 17:43:48 +01:00
includes [DI] leverage Contracts\Service 2018-09-04 19:12:10 +02:00
ini [DI] align IniFileLoader to PHP bugfix #76965 2018-11-10 16:03:16 +01:00
php feature #28976 [DI] Add a "default" EnvProcessor (jderusse) 2018-12-01 10:02:00 +01:00
Prototype Don't stop PSR-4 service discovery if a parent class is missing. 2018-01-26 21:15:55 +01:00
xml Merge branch '4.1' 2018-10-02 14:43:31 +02:00
yaml Merge branch '4.1' 2018-10-10 06:54:27 -07:00
array.json [DI] Allow processing env vars 2017-09-07 08:08:52 +02:00
Bar.php [DependencyInjection] Support local binding 2017-08-09 11:26:25 +02:00
BarInterface.php [DependencyInjection] Support local binding 2017-08-09 11:26:25 +02:00
CaseSensitiveClass.php Test that named arguments are prioritized over typehinted 2017-11-17 10:42:21 +02:00
CustomDefinition.php [DI] Fixed custom services definition BC break introduced in ec7e70fb… 2016-11-24 11:34:23 +01:00
DeprecatedClass.php [DI] Prevent AutowirePass from triggering irrelevant deprecations 2017-04-05 16:41:09 +02:00
FactoryDummy.php removed HHVM support 2017-06-01 15:17:54 -07:00
FooForCircularWithAddCalls.php [DI] fix dumping inlined services 2018-11-06 17:06:23 +01:00
NamedArgumentsDummy.php [DI] Allow binding by type+name 2018-05-06 08:21:25 -07:00
NamedArgumentsVariadicsDummy.php [DependencyInjection] Added support for variadics in named arguments 2017-12-01 06:31:04 -08:00
ParentNotExists.php [DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist 2017-11-27 10:49:34 +01:00
SimilarArgumentsDummy.php [DI] Remove scalar typehint in class used in test case 2017-11-19 14:43:05 +01:00
StdClassDecorator.php [DI] Add way to register service with implicit name using the PHP DSL 2018-01-23 07:58:25 +01:00
StubbedTranslator.php [DI] Test references inside ServiceLocator are not inlined 2017-04-29 20:26:40 +02:00
TestDefinition1.php [DependencyInjection] add ServiceSubscriberTrait 2018-06-04 21:55:50 +02:00
TestDefinition2.php [DependencyInjection] add ServiceSubscriberTrait 2018-06-04 21:55:50 +02:00
TestDefinition3.php [DependencyInjection] add ServiceSubscriberTrait 2018-06-04 21:55:50 +02:00
TestServiceSubscriber.php [DI] leverage Contracts\Service 2018-09-04 19:12:10 +02:00
TestServiceSubscriberChild.php [Contracts] Add traits+interfaces from the DI component 2018-09-04 10:20:02 +02:00
TestServiceSubscriberParent.php [DI] leverage Contracts\Service 2018-09-04 19:12:10 +02:00
TestServiceSubscriberTrait.php [DependencyInjection] add ServiceSubscriberTrait 2018-06-04 21:55:50 +02:00