8000 bug #59675 [FrameworkBundle] fix compat with AsCommand attributes fro… · symfony/symfony@ecb9728 · GitHub
[go: up one dir, main page]

Skip to content

Commit ecb9728

Browse files
committed
bug #59675 [FrameworkBundle] fix compat with AsCommand attributes from symfony/console < 7.3 (xabbuh)
This PR was merged into the 7.3 branch. Discussion ---------- [FrameworkBundle] fix compat with AsCommand attributes from symfony/console < 7.3 | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT FrameworkBundle 7.3 can be used with older releases of the Console component which do not provide help information through the `AsCommand` attribute. Commits ------- 23d949e fix compat with AsCommand attributes from symfony/console < 7.3
2 parents f1fa5c7 + 23d949e commit ecb9728

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

+2-2
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)
0