Skip to content

Commit 4abc95f

Browse files
committed
fix compat with AsCommand attributes from symfony/console < 7.3
FrameworkBundle 7.3 can be used with older releases of the Console component which do not provide help information through the AsCommand attribute.
1 parent feda5a4 commit 4abc95f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,11 @@ public function load(array $configs, ContainerBuilder $container): void
610610
->addTag('assets.package');
611611
$container->registerForAutoconfiguration(AssetCompilerInterface::class)
612612
->addTag('asset_mapper.compiler');
613-
$container->registerAttributeForAutoconfiguration(AsCommand::class, static function (ChildDefinition $definition, AsCommand $attribute, \ReflectionClass $reflector): void {
613+
$container->registerAttributeForAutoconfiguration(AsCommand::class, static function (ChildDefinition $definition, AsCommand $attribute): void {
614614
$definition->addTag('console.command', [
615615
'command' => $attribute->name,
616616
'description' => $attribute->description,
617-
'help' => $attribute->help,
617+
'help' => $attribute->help ?? null,
618618
]);
619619
});
620620
$container->registerForAutoconfiguration(Command::class)

0 commit comments

Comments
 (0)