-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[EventDispatcher] Better error reporting when arguments to dispatch() are swapped #34677
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
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.
LegacyEventDispatcherProxy
also needs a similar patch
It looks like we broke a test case sorry. |
Should I revert to checking for actual classes then, or change tests instead? |
yes please |
src/Symfony/Component/EventDispatcher/LegacyEventDispatcherProxy.php
Outdated
Show resolved
Hide resolved
Thanks for bearing with me! I can squash the commits if you like. |
Thank you @rimas-kudelis. |
… dispatch() are swapped (rimas-kudelis) This PR was squashed before being merged into the 4.3 branch. Discussion ---------- [EventDispatcher] Better error reporting when arguments to dispatch() are swapped | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #34676 | License | MIT Incorrect error is currently being reported when the second argument is an instance of `Symfony\Contracts\EventDispatcher\Event`. Commits ------- 54aac56 [EventDispatcher] Better error reporting when arguments to dispatch() are swapped
Incorrect error is currently being reported when the second argument is an instance of
Symfony\Contracts\EventDispatcher\Event
.