Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Messenger] fix wrong use of generator returns#31389
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| } | ||
| privatefunctiongetReceiver() | ||
| privatefunctiongetReceiver():AmqpReceiver |
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.
Added typehints to make it consistent with DoctrineTransport.
chalasr commentedMay 6, 2019
fabbot patch looks good |
xabbuh left a comment
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.
test failures look legit
Tobion commentedMay 6, 2019
Fixed tests |
fabpot commentedMay 6, 2019
@Tobion Can you apply fabbot's patch? |
And some other minor cleanups
Tobion commentedMay 6, 2019
Done |
fabpot commentedMay 6, 2019
Thank you@Tobion. |
This PR was merged into the 4.3-dev branch.Discussion----------[Messenger] fix wrong use of generator returns| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets || License | MIT| Doc PR | symfony/symfony-docs#... <!-- required for new features -->I've seen this problem many times: Mixing `yield` with `return []`.Unfortunately it cannot be forbidden at the compiler level because it's actually a feature:https://www.php.net/manual/de/generator.getreturn.phpBut usually not intended that way.Also added some other minor cleanups I've found.Commits-------e8a09e9 [Messenger] fix wrong use of generator returns
I've seen this problem many times: Mixing
yieldwithreturn [].Unfortunately it cannot be forbidden at the compiler level because it's actually a feature:https://www.php.net/manual/de/generator.getreturn.php
But usually not intended that way.
Also added some other minor cleanups I've found.