diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index a31bb95fb8de4..aa280e851267e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -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; @@ -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)) {
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: