-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[EventDispatcher]Get priority on listeners/subscribers #14302
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
Comments
@dupuchba there is no way to get the priorities. regarding the fact that the listeners are returned sorted, feel free to send a PR improving the phpdoc to mention it. |
@stof Ok, thx :-). But what do you think about decoupling the sorting of listeners and their "getting". |
@dupuchba how would you decouple it ? and we cannot return them not sorted. It would be a BC break. |
I don't know how to decouple it, it might be a terrible idea. I still added some information on the phpdoc #14304 . |
@stof just to continue on our discussion, do you see any value on being able to retrieve the priority of a given listener/subscriber ? |
there's already a discussion about it in #11263 |
@jakzal you just closed the other one :( |
@dupuchba the other one is not closed |
Hello all,
I'd like to know if there is a way to retrieve listeners/subscribers priority.
There is nothing specified in the
EventDispatcherInterface
.@stof as a merger of this component can you tell me ?
Another question I have is why we implicitly sort listeners in
getListeners
in theEventDispatcher.php
. It's confusing to me because as a user ofgetListeners
I am not aware that listeners are already sorted..The text was updated successfully, but these errors were encountered: