Skip to content

make:entity with multiple mappings fails  #783

Open
@pkly

Description

Using bundle v. 1.26.1 with symfony 4.4

doctrine:
    dbal:
        url: '%env(resolve:DATABASE_URL)%'

        # IMPORTANT: You MUST configure your server version,
        # either here or in the DATABASE_URL env var (see .env file)
        #server_version: '13'
    orm:
        auto_generate_proxy_classes: true
        naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
        auto_mapping: true
        mappings:
            AppCommon:
                is_bundle: false
                type: annotation
                dir: '%kernel.project_dir%/src/Common/Entity'
                prefix: 'App\Common\Entity'
                alias: AppCommon
            AppApi:
                is_bundle: false
                type: annotation
                dir: '%kernel.project_dir%/src/Api/Entity'
                prefix: 'App\Api\Entity'
                alias: AppApi
            AppDb:
                is_bundle: false
                type: annotation
                dir: '%kernel.project_dir%/src/Db/Entity'
                prefix: 'App\Db\Entity'
                alias: AppDb

The following configuration is a valid one, but make:entity does not allow for files to be generated in those mappings, falling back to an unconfigured one which exists by default.
It creates new folders under src/ (entity and repository) for any class I type in
Something like bin/console make:entity AppDb\Something also fails.

It should generate the entity in src/Db/Entity and it just makes it in /src

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions