Closed
Description
Symfony version(s) affected: 5.2.1
PHP version: 7.4
Description
I use Symfony/messenger component with DoctrineTransport.
It works great in the dev environment, but I'm getting this error in the prod environment when I want to dispatch a message.
Warning: Cannot declare class Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransportFactory, because the name is already in use
I tried to trace it, and it seems it's because of preload functionality in php7.4, and somehow after cache generation, the DoctrineTransportFactory
class was included twice.
Additional context
Sentry log:
https://sentry.io/share/issue/63ed6759822349c4b991b9ea8fc4ab14/