[EventDispatcher] Fix TraceableEventDispatcher FC/BC layer#31254
Merged
nicolas-grekas merged 1 commit intosymfony:masterfrom Apr 27, 2019
Merged
[EventDispatcher] Fix TraceableEventDispatcher FC/BC layer#31254nicolas-grekas merged 1 commit intosymfony:masterfrom
nicolas-grekas merged 1 commit intosymfony:masterfrom
Conversation
0bef732 to
1add058
Compare
Simperfit
approved these changes
Apr 25, 2019
adef564 to
fd24888
Compare
Member
|
See alternative in #31258 |
fd24888 to
6a78e46
Compare
chalasr
commented
Apr 26, 2019
| }; | ||
| } else { | ||
| $closure = $listener instanceof \Closure ? $listener : \Closure::fromCallable($listener); | ||
| $closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener); |
Member
Author
There was a problem hiding this comment.
WrappedListener handles this optimization internally
Member
Author
|
Remaining issue fixed, ready. |
a14a4ed to
c34910e
Compare
Member
|
What about also adding an assertion to the test which checks that the event instance passed to the listener actually is an instance of the |
Member
implementing this interface is not a requirement |
nicolas-grekas
approved these changes
Apr 27, 2019
c34910e to
c5b3b34
Compare
Member
Author
|
Assertion added to ensure that the event passed to the listener is the same as the dispatched one (and not a proxy), also rebased to make the CI green. |
Member
|
Thank you @chalasr. |
nicolas-grekas
added a commit
that referenced
this pull request
Apr 27, 2019
… (chalasr) This PR was merged into the 4.3-dev branch. Discussion ---------- [EventDispatcher] Fix TraceableEventDispatcher FC/BC layer | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | n/a | Tests pass? | yes | Fixed tickets | #31221 | License | MIT | Doc PR | n/a also renames `WrappedEvent` to `LegacyEventProxy` Commits ------- c5b3b34 [EventDispatcher] Fix TraceableEventDispatcher FC/BC layer
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.
also renames
WrappedEventtoLegacyEventProxy