feature #32295 [FrameworkBundle] Add autowiring alias for PSR-14 (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Add autowiring alias for PSR-14

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

2d5bcda9e7 [FrameworkBundle] Add autowiring alias for PSR-14
This commit is contained in:
Tobias Schultze 2019-07-05 21:50:21 +02:00
commit 42899cdd67

View File

@ -16,6 +16,7 @@ use Doctrine\Common\Annotations\Reader;
use Http\Client\HttpClient;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Container\ContainerInterface as PsrContainerInterface;
use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface;
use Psr\Http\Client\ClientInterface;
use Psr\Log\LoggerAwareInterface;
use Symfony\Bridge\Monolog\Processor\DebugProcessor;
@ -154,6 +155,10 @@ class FrameworkExtension extends Extension
$loader->load('fragment_renderer.xml');
$loader->load('error_catcher.xml');
if (interface_exists(PsrEventDispatcherInterface::class)) {
$container->setAlias(PsrEventDispatcherInterface::class, 'event_dispatcher');
}
$container->registerAliasForArgument('parameter_bag', PsrContainerInterface::class);
if (class_exists(Application::class)) {