Skip to content

Commit 88bea98

Browse files
Add #[As-prefix] to service attributes
1 parent 420a9e4 commit 88bea98

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
@@ -59,7 +59,7 @@
5959
use Symfony\Component\DependencyInjection\Parameter;
6060
use Symfony\Component\DependencyInjection\Reference;
6161
use Symfony\Component\DependencyInjection\ServiceLocator;
62-
use Symfony\Component\EventDispatcher\Attribute\EventListener;
62+
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
6363
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
6464
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
6565
use Symfony\Component\Finder\Finder;
@@ -555,7 +555,7 @@ public function load(array $configs, ContainerBuilder $container)
555555
$container->registerForAutoconfiguration(LoggerAwareInterface::class)
556556
->addMethodCall('setLogger', [new Reference('logger')]);
557557

558-
$container->registerAttributeForAutoconfiguration(EventListener::class, static function (ChildDefinition $definition, EventListener $attribute): void {
558+
$container->registerAttributeForAutoconfiguration(AsEventListener::class, static function (ChildDefinition $definition, AsEventListener $attribute): void {
559559
$definition->addTag('kernel.event_listener', get_object_vars($attribute));
560560
});
561561

0 commit comments

Comments
 (0)