Skip to content

Commit da3e0eb

Browse files
committed
Service 'security.command.debug_firewall' is only available if symfony/console is installed
1 parent 971ff37 commit da3e0eb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

DependencyInjection/SecurityExtension.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,10 @@ private function createFirewall(ContainerBuilder $container, string $id, array $
529529
$listeners[] = new Reference('security.firewall.authenticator.'.$id);
530530

531531
// Add authenticators to the debug:firewall command
532-
$debugCommand = $container->getDefinition('security.command.debug_firewall');
533-
$debugCommand->replaceArgument(3, array_merge($debugCommand->getArgument(3), [$id => $authenticators]));
532+
if ($container->hasDefinition('security.command.debug_firewall')) {
533+
$debugCommand = $container->getDefinition('security.command.debug_firewall');
534+
$debugCommand->replaceArgument(3, array_merge($debugCommand->getArgument(3), [$id => $authenticators]));
535+
}
534536
}
535537

536538
$config->replaceArgument(7, $configuredEntryPoint ?: $defaultEntryPoint);

0 commit comments

Comments
 (0)