-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[EventDispatcher] TraceableEventDispatcher resets event listener priorities #17459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c960657
commented
Jan 20, 2016
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #15550 |
License | MIT |
Doc PR | - |
11d264c
to
683169b
Compare
$tdispatcher->addListener('foo', $listener1 = function () use (&$called) { $called[] = 'foo1'; }); | ||
$tdispatcher->addListener('foo', $listener2 = function () use (&$called) { $called[] = 'foo2'; }); | ||
$tdispatcher->addListener('foo', $listener1 = function () use (&$called) { $called[] = 'foo1'; }, 10); | ||
$tdispatcher->addListener('foo', $listener2 = function () use (&$called) { $called[] = 'foo2'; }, 20); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the $listener1
and $listener2
variables are actually unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@c960657 what is the lower Symfony version where this patch can be applied ? The bug seems to impact 2.7+ |
683169b
to
fc40005
Compare
@stof The patch applies cleanly to 2.7+. The bug seems to have always been there, even back in 2.3 when TraceableEventDispatcher belonged to HttpKernel. |
fc40005
to
9d553b7
Compare
@c960657 If the bug is present in 2.3, we need to fix it there first. Can you work on creating a PR for 2.3? |
@c960657 Sorry for that but I've closed the other PRs as the listener priority is only available as of 2.8, so I'm going to merge this one on 2.8. |
Thank you @c960657. |
…stener priorities (c960657) This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #17459). Discussion ---------- [EventDispatcher] TraceableEventDispatcher resets event listener priorities | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #15550 | License | MIT | Doc PR | - Commits ------- 233e5b8 [EventDispatcher] TraceableEventDispatcher resets listener priorities