[EventDispatcher] added EventDispatcher::getListenerPriority()#16198
Merged
Conversation
Member
Author
There was a problem hiding this comment.
not needed as we override the value just afterwards.
Member
Author
|
Doing |
0ebb50f to
309dc63
Compare
Member
There was a problem hiding this comment.
this does not make sense. It cannot be null
Member
Author
There was a problem hiding this comment.
indeed, wrong copy/paste. fixed
309dc63 to
068e955
Compare
fabpot
added a commit
that referenced
this pull request
Oct 12, 2015
…iority() (fabpot) This PR was merged into the 2.8 branch. Discussion ---------- [EventDispatcher] added EventDispatcher::getListenerPriority() | Q | A | ------------- | --- | Bug fix? | yes | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #14563, #15825 | License | MIT | Doc PR | n/a In #14563, we added a way to get the priorities of listeners, but as noted by @Tobion in #15825, the implementation is sub-optimal because of two main reasons: the change is not part of the interface but more importantly, the added boolean changes the return value of `getListeners()`. This PR reverts most of #14563 to add a `getListenerPriority()` method. This method is quite slow, but as it should only be used for debugging purposes (on the CLI or the WDT), I think it's not really a problem. In 3.0, this method should probably be added to `EventDispatcherInterface`. ping @Tobion Commits ------- 068e955 [EventDispatcher] added EventDispatcher::getListenerPriority()
This was referenced Oct 20, 2015
Tobion
added a commit
that referenced
this pull request
Oct 22, 2015
This PR was merged into the 2.8 branch. Discussion ---------- [EventDispatcher] fix docblock | Q | A | ------------- | --- | Fixed tickets | #16198 (comment) | License | MIT Commits ------- 6e515fb [EventDispatcher] fix docblock
Tobion
added a commit
that referenced
this pull request
Oct 23, 2015
…interface (xabbuh) This PR was merged into the 3.0-dev branch. Discussion ---------- [EventDispatcher] add method getListenerPriority() to interface | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | #16198 | License | MIT | Doc PR | todo Commits ------- f8019c8 add method getListenerPriority() to interface
Merged
jmikola
added a commit
to jmikola/WildcardEventDispatcher
that referenced
this pull request
Sep 9, 2016
For the time being, do not support wildcard patterns with getListenerPriority(). An exception will be thrown if getListenerPriority() is not implemented on the inner dispatcher. The method was added in symfony/symfony#16198 for Symfony 2.8. It was added to the interface in Symfony 3.0, which is relevant for our test cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #14563, we added a way to get the priorities of listeners, but as noted by @Tobion in #15825, the implementation is sub-optimal because of two main reasons: the change is not part of the interface but more importantly, the added boolean changes the return value of
getListeners().This PR reverts most of #14563 to add a
getListenerPriority()method. This method is quite slow, but as it should only be used for debugging purposes (on the CLI or the WDT), I think it's not really a problem.In 3.0, this method should probably be added to
EventDispatcherInterface.ping @Tobion