Skip to content

Commit 911ba6c

Browse files
GromNaNfabpot
authored andcommitted
[DependencyInjection] Apply attribute configurator to child classes
1 parent 000203b commit 911ba6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,9 +699,9 @@ public function load(array $configs, ContainerBuilder $container): void
699699
$taskAttributeClass,
700700
static function (ChildDefinition $definition, AsPeriodicTask|AsCronTask $attribute, \ReflectionClass|\ReflectionMethod $reflector): void {
701701
$tagAttributes = get_object_vars($attribute) + [
702-
'trigger' => match ($attribute::class) {
703-
AsPeriodicTask::class => 'every',
704-
AsCronTask::class => 'cron',
702+
'trigger' => match (true) {
703+
$attribute instanceof AsPeriodicTask => 'every',
704+
$attribute instanceof AsCronTask => 'cron',
705705
},
706706
];
707707
if ($reflector instanceof \ReflectionMethod) {

0 commit comments

Comments
 (0)