Skip to content

Commit accacab

Browse files
committed
IBX-10428: Fixed invokable commands failing to compile Container
1 parent d7bd603 commit accacab

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPass.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
namespace Ibexa\Bundle\Core\DependencyInjection\Compiler;
1010

11+
use Symfony\Component\Console\Command\Command;
1112
use Symfony\Component\Console\Input\InputOption;
1213
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1314
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -19,6 +20,11 @@ public function process(ContainerBuilder $container): void
1920
foreach ($container->findTaggedServiceIds('console.command') as $id => $attributes) {
2021
$definition = $container->getDefinition($id);
2122

23+
$class = $definition->getClass();
24+
if (!is_a($class, Command::class, true)) {
25+
continue;
26+
}
27+
2228
$definition->addMethodCall('addOption', [
2329
'siteaccess',
2430
null,

0 commit comments

Comments
 (0)