Skip to content

[Messenger] Fix missing @throws phpdoc on MiddlewareInterface, MessageBusInterface and SenderInterface #52915

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

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

VincentLanglet
Copy link
Contributor

Q A
Branch? 5.4
Bug fix? yes (kinda, it's missing phpdoc)
New feature? no
Deprecations? no
Issues Fix #...
License MIT

@throws phpdoc help the developper to know those methods can throw an exception and to have a contract about which exception can be thrown.

I recently got an exception in production because of the call $messageBus->dispatch() without knowing it could throw an exception. Seems like it's because it iterable on every Middleware and a lot of middleware are throwing exception.

As an example:

Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For 7.1.

@fabpot fabpot modified the milestones: 5.4, 7.1 Dec 8, 2023
@fabpot fabpot changed the base branch from 5.4 to 7.1 December 8, 2023 13:57
@fabpot fabpot requested a review from dunglas as a code owner December 8, 2023 13:57
@fabpot fabpot force-pushed the fix-throw-phopdoc branch from d2749eb to 70a74b7 Compare December 8, 2023 13:57
@fabpot
Copy link
Member

fabpot commented Dec 8, 2023

Thank you @VincentLanglet.

@fabpot fabpot merged commit 811cce7 into symfony:7.1 Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants