-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Set minimum required version for framework-bundle to 5.3 #41545
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
Set minimum required version for framework-bundle to 5.3 #41545
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
Another option could be doing something like this: if (null !== $globalReceiverName && $container->hasDefinition('messenger.failure_transports.default')) {
$failureTransportsMap[$commandDefinition->getArgument(0)] = new Reference('messenger.failure_transports.default');
} To add a |
cc @monteiro |
At first glace, this looks like a regression to me. If FrameworkBundle was able to integrate Messenger 5.2, an upgrade to 5.3 must not break that integration. Would it be very difficult to restore compatibility? |
Let me create a PR to fix this. Thanks @jordisala1991 for finding it! 😄 |
@jordisala1991 Does #41553 work for you? |
…tence alias being used (monteiro) This PR was squashed before being merged into the 5.3 branch. Discussion ---------- [Messenger] fix BC for FrameworkBundle 4.4 with a non-existence alias being used | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #41545 ... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT 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 Commits ------- aa0e166 [Messenger] fix BC for FrameworkBundle 4.4 with a non-existence alias being used
When trying to update
symfony/messenger
to 5.3 while still usingsymfony/framework-bundle
4.4 I've got this error:Full Stack trace:
Here you can see the issue reproduced: Runroom/archetype-symfony#1913
This is caused by this PR: #38468
This is the piece of code from
framework-bundle
: https://github.com/symfony/symfony/blob/5.3/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L1969-L1976This is the usage of that service on
messenger
:https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php#L260-L264
It adds some logic to the framework bundle to declare a new alias:
messenger.failure_transports.default
which is used on aCompilerPass
on the messenger component. This service is not present on 4.4 of thesymfony/framework-bundle
.Maybe there is another option to deal with this cases, but I wasn't sure.