Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 42899cd

Browse filesBrowse files
committed
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 ------- 2d5bcda [FrameworkBundle] Add autowiring alias for PSR-14
2 parents 43c14dd + 2d5bcda commit 42899cd
Copy full SHA for 42899cd

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Http\Client\HttpClient;
1717
use Psr\Cache\CacheItemPoolInterface;
1818
use Psr\Container\ContainerInterface as PsrContainerInterface;
19+
use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface;
1920
use Psr\Http\Client\ClientInterface;
2021
use Psr\Log\LoggerAwareInterface;
2122
use Symfony\Bridge\Monolog\Processor\DebugProcessor;
@@ -154,6 +155,10 @@ public function load(array $configs, ContainerBuilder $container)
154155
$loader->load('fragment_renderer.xml');
155156
$loader->load('error_catcher.xml');
156157

158+
if (interface_exists(PsrEventDispatcherInterface::class)) {
159+
$container->setAlias(PsrEventDispatcherInterface::class, 'event_dispatcher');
160+
}
161+
157162
$container->registerAliasForArgument('parameter_bag', PsrContainerInterface::class);
158163

159164
if (class_exists(Application::class)) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.