Skip to content

Commit 17c3728

Browse files
committed
[DebugBundle][FrameworkBundle] Fix using the framework without the Console component
1 parent 8b4360b commit 17c3728

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DependencyInjection/DebugExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Bridge\Monolog\Command\ServerLogCommand;
1515
use Symfony\Bundle\DebugBundle\Command\ServerDumpPlaceholderCommand;
1616
use Symfony\Component\Config\FileLocator;
17+
use Symfony\Component\Console\Command\Command;
1718
use Symfony\Component\DependencyInjection\ContainerBuilder;
1819
use Symfony\Component\DependencyInjection\Extension\Extension;
1920
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
@@ -92,7 +93,7 @@ public function load(array $configs, ContainerBuilder $container)
9293
;
9394
}
9495

95-
if (!class_exists(ServerLogCommand::class)) {
96+
if (!class_exists(Command::class) || !class_exists(ServerLogCommand::class)) {
9697
$container->removeDefinition('monolog.command.server_log');
9798
}
9899
}

0 commit comments

Comments
 (0)