Skip to content

Commit 5ebaad3

Browse files
committed
added a note about why the debug dispatcher cannot be used everywhere
1 parent 5ed1d01 commit 5ebaad3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ public function load(array $configs, ContainerBuilder $container)
5757
if ($container->getParameter('kernel.debug')) {
5858
$loader->load('debug.xml');
5959

60-
// only HttpKernel needs the debug event dispatcher
60+
// we can't replace the event_dispatcher service with the debug
61+
// one as it would lead to circular references (mainly because the debug
62+
// event dispatcher needs the profiler, which triggers the creation of many
63+
// other services that can depend on the dispatcher itself -- CLI commands
64+
// like assetic:dump and twig:lint exhibits this issue for instance)
6165
$definition = $container->findDefinition('http_kernel');
6266
$arguments = $definition->getArguments();
6367
$arguments[0] = new Reference('debug.event_dispatcher');

0 commit comments

Comments
 (0)