Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dbc2940

Browse files
committed
only load console profiling if console is actually available
this fixes a regression introduced in ea5a3ccdf66474aaa06bb95f38fc56b8e9589ec6
1 parent 2fa3b3a commit dbc2940

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ public function load(array $configs, ContainerBuilder $container): void
646646
$this->registerNotifierConfiguration($config['notifier'], $container, $loader, $this->readConfigEnabled('webhook', $container, $config['webhook']));
647647
}
648648

649-
// profiler depends on form, validation, translation, messenger, mailer, http-client, notifier, serializer being registered
649+
// profiler depends on form, validation, translation, messenger, mailer, http-client, notifier, serializer being registered. console is optional
650650
$this->registerProfilerConfiguration($config['profiler'], $container, $loader);
651651

652652
if ($this->readConfigEnabled('webhook', $container, $config['webhook'])) {
@@ -1078,7 +1078,7 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $
10781078
$container->getDefinition('profiler_listener')
10791079
->addArgument($config['collect_parameter']);
10801080

1081-
if (!$container->getParameter('kernel.debug') || !class_exists(CliRequest::class) || !$container->has('debug.stopwatch')) {
1081+
if (!$container->getParameter('kernel.debug') || !$this->hasConsole() || !class_exists(CliRequest::class) || !$container->has('debug.stopwatch')) {
10821082
$container->removeDefinition('console_profiler_listener');
10831083
}
10841084

0 commit comments

Comments
 (0)