Skip to content

Commit

Permalink
feature #32295 [FrameworkBundle] Add autowiring alias for PSR-14 (nic…
Browse files Browse the repository at this point in the history
…olas-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
-------

2d5bcda [FrameworkBundle] Add autowiring alias for PSR-14
  • Loading branch information
Tobion committed Jul 5, 2019
2 parents 43c14dd + 2d5bcda commit 42899cd
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -16,6 +16,7 @@
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;
Expand Down Expand Up @@ -154,6 +155,10 @@ public function load(array $configs, ContainerBuilder $container)
$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)) {
Expand Down

0 comments on commit 42899cd

Please sign in to comment.