Skip to content

Commit 0256e59

Browse files
committed
minor #24186 [EventDispatcher] Removed unnecessary getDefinition() call from RegisterListenersPass (derrabus)
This PR was merged into the 3.3 branch. Discussion ---------- [EventDispatcher] Removed unnecessary getDefinition() call from RegisterListenersPass | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | N/A In `RegisterListenersPass`, the definition of each tagged listener service is pulled from the builder although it is never used. This PR removes the line of code where this happens. Commits ------- d1f7024 Removed unnecessary getDefinition() call.
2 parents 19e5ed1 + d1f7024 commit 0256e59

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ public function process(ContainerBuilder $container)
6262
$definition = $container->findDefinition($this->dispatcherService);
6363

6464
foreach ($container->findTaggedServiceIds($this->listenerTag, true) as $id => $events) {
65-
$def = $container->getDefinition($id);
66-
6765
foreach ($events as $event) {
6866
$priority = isset($event['priority']) ? $event['priority'] : 0;
6967

0 commit comments

Comments
 (0)