Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[EventDispatcher] fix getting priorities of listeners during dispatch #22568

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

Merged
merged 1 commit into from
Apr 28, 2017

Conversation

dmaicher
Copy link
Contributor

Q A
Branch? 3.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #22520
License MIT
Doc PR -

The WebProfiler collects listener info during dispatching the kernel.terminate event which caused issues while retrieving priorities as the wrappers are registered instead of the real listeners.

@stof
Copy link
Member

stof commented Apr 28, 2017

I think a better solution is to fix the implementation of getListenerPriority in the TraceableEventDispatcher, to fix the issue for any code reading the priority.
The actual fix would be similar to what is done when removing listeners, as I explained in the issue

@dmaicher dmaicher force-pushed the fix-listener-prio branch from 37deb11 to 84399c5 Compare April 28, 2017 11:41
@dmaicher
Copy link
Contributor Author

@stof you are right 👍 I pushed a new version.

@dmaicher dmaicher force-pushed the fix-listener-prio branch from 84399c5 to 94e1fd4 Compare April 28, 2017 11:59
@dmaicher dmaicher force-pushed the fix-listener-prio branch from 94e1fd4 to 79b71c0 Compare April 28, 2017 12:00
@nicolas-grekas
Copy link
Member

Thank you @dmaicher.

@nicolas-grekas nicolas-grekas merged commit 79b71c0 into symfony:3.2 Apr 28, 2017
nicolas-grekas added a commit that referenced this pull request Apr 28, 2017
…ng dispatch (dmaicher)

This PR was merged into the 3.2 branch.

Discussion
----------

[EventDispatcher] fix getting priorities of listeners during dispatch

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22520
| License       | MIT
| Doc PR        | -

The WebProfiler collects listener info during dispatching the `kernel.terminate` event which caused issues while retrieving priorities as the wrappers are registered instead of the real listeners.

Commits
-------

79b71c0 [EventDispatcher] fix getting priorities of listeners during dispatch
@fabpot fabpot mentioned this pull request May 1, 2017
@dmaicher dmaicher deleted the fix-listener-prio branch May 1, 2017 17:52
nicolas-grekas added a commit that referenced this pull request May 2, 2017
This PR was merged into the 3.2 branch.

Discussion
----------

[EventDispatcher] fix merge of #22541 from 2.8

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This cleans up a test case that was merged from 2.8 into 3.2 here: 824dc8b

@fabpot due to different implementations I created 2 PR's:

2.8: #22541
3.2: #22568

So the 2.8 merge into 3.2 of my change-set introduced some unused variable `$isWrapped` here: 824dc8b#diff-af3c4fbca8bb77957c00087543ae5a4dR113

This PR just cleans it up and also removes the data provider 😉

Commits
-------

f67eba8 [EventDispatcher] fix merge of #22541 from 2.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants