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] AddUnwrapHandlerExceptionMiddleware#52949
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
carsonbot commentedDec 8, 2023
Hey! Thanks for your PR. You are targeting branch "7.1" but it seems your PR description refers to branch "7.1 for features". Cheers! Carsonbot |
7b50f67 to7514be6Comparero0NL commentedDec 8, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
why not unwrap from within HandleTrait then? edit: oh BC -.-, perhaps introduce a new property flag instead 🤔 |
3d72517 to99e8e2bCompareMatTheCat commentedDec 8, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Will give it a try thanks! The property would only serve as a BC layer so I’m not sure ifhttps://symfony.com/doc/current/contributing/code/bc.html#adding-an-argument-to-a-public-method would apply? |
ro0NL commentedDec 8, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
adding new private property to traits is allowed :) it not sure why it would 'serve as a BC layer', it could be just a new feature if we think it's the better default, then perhaps deprecating I dont like the middleware approach, since it might force users to split their bus into multiple buses. IMHO it breaks the abstraction of |
MatTheCat commentedDec 8, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Oh indeed I thought you were talking about a new argument for
AFAIU we first need a way to make the new behavior opt-in (to keep BC), but then remove the old one. The opt-in mechanism would then only serve as a BC layer.
Don’t know about that, but |
src/Symfony/Component/Messenger/Middleware/UnwrapHandlerExceptionMiddleware.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
MatTheCat commentedDec 9, 2023
@OskarStark@chalasr FYI I also opened#52952 which is an alternative proposed by@ro0NL I find better. Do you have a preference? |
…ionMiddleware.phpCo-authored-by: Oskar Stark <oskarstark@googlemail.com>
MatTheCat commentedFeb 2, 2024
Closing, since there is no traction and a solution is trivial to implement in userland. |
Uh oh!
There was an error while loading.Please reload this page.
In competition with#52952
When usingthe
HandleTrait, theHandlerFailedExceptionjust adds noise as the wrapped exception is the one we would expect to be thrown.This PR adds an
UnwrapHandlerExceptionMiddleware(idea stolen fromSulu’sUnpackExceptionMiddleware): added to a bus before theHandleMessageMiddleware, it will throw the single exception wrapped in aHandlerFailedException.