[full-ci] Adjust symfony deprecated #40521
Merged
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
Some things have been deprecated in Symfony 4 and removed in Symfony 5. The new way of doing each thing is implemented in Symfony 4.4, so we can move to that, and then there will be no code to change again when moving up to Symfony 5. This is what I have found so far:
Symfony\Component\EventDispatcher\Event
is nowSymfony\Contracts\EventDispatcher\Event
stopPropagation()
returnsvoid
. Classes that extend that need to have the return type declared.Symfony\Component\Translation\PluralizationRules
is gone in Symfony 5.Symfony\Contracts\Translation\TranslatorTrait
has the pluralization rules in functiongetPluralizationRule
Implement these changes now.
Related Issue
#39630
How Has This Been Tested?
CI
Types of changes
Checklist: