Skip to content

Commit 05ed395

Browse files
committed
Remove custom handler for Workflow listener attributes
1 parent 911ba6c commit 05ed395

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,29 +1104,6 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
11041104
$container->setParameter('workflow.has_guard_listeners', true);
11051105
}
11061106
}
1107-
1108-
$listenerAttributes = [
1109-
Workflow\Attribute\AsAnnounceListener::class,
1110-
Workflow\Attribute\AsCompletedListener::class,
1111-
Workflow\Attribute\AsEnterListener::class,
1112-
Workflow\Attribute\AsEnteredListener::class,
1113-
Workflow\Attribute\AsGuardListener::class,
1114-
Workflow\Attribute\AsLeaveListener::class,
1115-
Workflow\Attribute\AsTransitionListener::class,
1116-
];
1117-
1118-
foreach ($listenerAttributes as $attribute) {
1119-
$container->registerAttributeForAutoconfiguration($attribute, static function (ChildDefinition $definition, AsEventListener $attribute, \ReflectionClass|\ReflectionMethod $reflector) {
1120-
$tagAttributes = get_object_vars($attribute);
1121-
if ($reflector instanceof \ReflectionMethod) {
1122-
if (isset($tagAttributes['method'])) {
1123-
throw new LogicException(sprintf('"%s" attribute cannot declare a method on "%s::%s()".', $attribute::class, $reflector->class, $reflector->name));
1124-
}
1125-
$tagAttributes['method'] = $reflector->getName();
1126-
}
1127-
$definition->addTag('kernel.event_listener', $tagAttributes);
1128-
});
1129-
}
11301107
}
11311108

11321109
private function registerDebugConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader): void

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"ext-xml": "*",
2222
"symfony/cache": "^6.4|^7.0",
2323
"symfony/config": "^6.4|^7.0",
24-
"symfony/dependency-injection": "^6.4|^7.0",
24+
"symfony/dependency-injection": "^7.1",
2525
"symfony/deprecation-contracts": "^2.5|^3",
2626
"symfony/error-handler": "^6.4|^7.0",
2727
"symfony/event-dispatcher": "^6.4|^7.0",

0 commit comments

Comments
 (0)