Skip to content

Commit d87d29d

Browse files
committed
replace a not-existing virtual request stack with the real one
1 parent b3bfc6d commit d87d29d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener;
1515
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
17+
use Symfony\Component\DependencyInjection\Reference;
1718

1819
/**
1920
* Registers the file link format for the {@link \Symfony\Component\HttpKernel\DataCollector\DumpDataCollector}.
@@ -36,5 +37,9 @@ public function process(ContainerBuilder $container)
3637
if (!$container->hasParameter('web_profiler.debug_toolbar.mode') || WebDebugToolbarListener::DISABLED === $container->getParameter('web_profiler.debug_toolbar.mode')) {
3738
$definition->replaceArgument(3, null);
3839
}
40+
41+
if (!$container->has('.virtual_request_stack')) {
42+
$definition->replaceArgument(3, new Reference('request_stack'));
43+
}
3944
}
4045
}

0 commit comments

Comments
 (0)