Skip to content

[symfony/doctrine-bridge] 5.4 : auto mapping not working at all #44355

@acantepie

Description

@acantepie

Symfony version(s) affected

5.4

Description

Auto mapping of vendor entity not working anymore.

How to reproduce

My doctrine config :

doctrine:
    dbal:
        url: '%env(resolve:DATABASE_URL)%'
    orm:
        auto_generate_proxy_classes: true
        naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
        auto_mapping: true
        mappings:
            App:
                is_bundle: false
                type: annotation
                dir: '%kernel.project_dir%/src/Entity'
                prefix: 'App\Entity'
                alias: App

With symfony/doctrine-bridge 5.3.11, Entity living on directory vendor/foolib/foobundle/src/Entity was registered.
With symfony/doctrine-bridge 5.4.0, Entity got error :
The class 'Foo\FooBundle\Entity\BarEntity' was not found in the chain configured namespaces App\Entity

Possible Solution

No response

Additional Context

I am not sure bug is from symfony/doctrine-bridge, but add "symfony/doctrine-bridge": "5.3.*", on composer.json solve the problem

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