Adjust Symfony eventDispatcher->dispatch calls#36897
Merged
Conversation
56ea2a4 to
2eefd93
Compare
Codecov Report
@@ Coverage Diff @@
## master #36897 +/- ##
============================================
+ Coverage 64.01% 64.18% +0.16%
Complexity 19135 19135
============================================
Files 1270 1270
Lines 74848 74872 +24
Branches 1329 1329
============================================
+ Hits 47917 48057 +140
+ Misses 26540 26424 -116
Partials 391 391
Continue to review full report at Codecov.
|
Contributor
Author
|
@micbar please review or select someone to review this. It would be nice if we can merge this refactoring before making the 10.4 release branch. |
micbar
approved these changes
Feb 6, 2020
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.
Description
We updated from Symfony 3.4 to 4.4 in PR #36881
Symfony 4.3 (and thus 4.4) adjusted the
EventDispatcherdispatchmethod to take parameters in the opposite order.https://symfony.com/blog/new-in-symfony-4-3-simpler-event-dispatching
symfony/symfony#28920
symfony/symfony#33115
The change was made in a BC way - if the parameters are provided the old way around, then the
dispatchmethod flips them. So existing code is OK. But in Symfony5 the "old way" is likely to have been removed.I noticed this because some apps have
phancode analysis that reports that the parameters are around the "wrong way" (the old way). e.g.IMO it is good to refactor this in core now, rather than leave it waiting to break things when we go to Symfony5 some day.
I adjusted the existing Symfony4 update changelog to include this PR.
How Has This Been Tested?
Local unit test runs and CI
Types of changes
Checklist: