Description
Symfony version(s) affected
>=5.1
Description
When one uses "symfony/symfony": "^5.4"
in their composer.json to get the full stack framework, the RejectRedeliveredMessageMiddleware
causes errors because it's tightly coupled to Amqp classes.
The autoloader expected class "Symfony\Component\Messenger\Transport\AmqpExt\AmqpReceivedStamp" to be defined in file "{redacted}". The file was found but the class was not in it, the class name or namespace probably has a typo. (500 Internal Server Error)
When requiring the messenger component directly, the amqp bridge is available:
but that requirement is not explicit in the root composer.json
:
Lines 34 to 57 in bbe4105
Feels like it should probably be there in the 5.4 release?
There is an open PR addressing the coupling issue targeting 6.1: #41749 but might be worth solving in 5.4 by making that depenency explicit for user of the full stack framework. I know that's frowned uppon now, but I suspect there's a lot of legacy apps out there with just symfony/symfony
in their composer.json
files.
How to reproduce
Try to use messenger with symfony full stack >= 5.1 with messenger and without having symfony/amqp-messenger
installed
Possible Solution
Add symfony/amqp-messenger
to the symfony/symfony
composer.json
.
Additional Context
No response