Skip to content

Commit

Permalink
minor #24186 [EventDispatcher] Removed unnecessary getDefinition() ca…
Browse files Browse the repository at this point in the history
…ll 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.
  • Loading branch information
fabpot committed Sep 13, 2017
2 parents 19e5ed1 + d1f7024 commit 0256e59
Showing 1 changed file with 0 additions and 2 deletions.
Expand Up @@ -62,8 +62,6 @@ public function process(ContainerBuilder $container)
$definition = $container->findDefinition($this->dispatcherService);

foreach ($container->findTaggedServiceIds($this->listenerTag, true) as $id => $events) {
$def = $container->getDefinition($id);

foreach ($events as $event) {
$priority = isset($event['priority']) ? $event['priority'] : 0;

Expand Down

0 comments on commit 0256e59

Please sign in to comment.