Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Cannot declare class Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransportFactory, because the name is already in use #39961

Copy link
Copy link
Closed
@mahmoodbazdar

Description

@mahmoodbazdar
Issue body actions

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/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.