-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] fix BC for FrameworkBundle 4.4 with a non-existence alias being used #41553
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
[Messenger] fix BC for FrameworkBundle 4.4 with a non-existence alias being used #41553
Conversation
Can you help us review this BC @weaverryan |
I was able to test the behaviour with this repository. Feel fee to test it too. Everything seems to work fine, and the global failed transport is set correctly. I tested using the AMQP transport in the repository. |
Hey! I think @DavidBadura has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
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.
Good catch. This makes sense to me: in symfony/messenger 5.3 + framework-bundle 4.4, we still need this $failureTransportsMap
but there will probably only be just the 1 failure transport (it's technically possible someone could tag there own, and that's fine - it would be handled below this code like normal).
Anyways, this patch takes that one failure transport and puts it into the array. Makes sense
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.
Works in my project 👍
0f5dddc
to
aa0e166
Compare
Thank you @monteiro. |
When trying to update symfony/messenger to 5.3 while still using symfony/framework-bundle 4.4 there is an error:
The service "console.command.messenger_failed_messages_retry" has a dependency on a non-existent service "messenger.failure_transports.default".
This is because in Symfony Messenger 5.3, on the PR #38468 to support multiple failure transports we have created an alias, that is only available on the FrameworkBundle 5.3.
This fix will use an already existence alias.
Sample project to test this behavior: https://github.com/monteiro/PR-41553-symfony