Skip to content

default_entity_manager config param is not inherited from parent config file #1337

@bravik

Description

@bravik

This line in Configuratation:

$v['default_entity_manager'] = isset($v['default_entity_manager']) ? (string) $v['default_entity_manager'] : 'default';

makes default_entity_manager (=<some_none_default_value>) param defined in config/packages/doctrine.yml
been overriden by config/packages/prod/doctrine.yml without this option.
Instead of the value from config/packages/doctirne.yml we have default value.
Which is conter-intuitive and took a couple of time to investigate mapping issues.

Example:

#c onfig/packages/doctrine.yml
doctrine:
  # ...
    orm:
        auto_generate_proxy_classes: true
        default_entity_manager: app
        entity_managers:
            app:
               # ...
            module:
               #...
#config/packages/prod/doctrine.yml
# The default one, generated by flex

doctrine:
    orm:
        auto_generate_proxy_classes: false
        metadata_cache_driver:
            type: pool
            pool: doctrine.system_cache_pool
        query_cache_driver:
            type: pool
            pool: doctrine.system_cache_pool
        result_cache_driver:
            type: pool
            pool: doctrine.result_cache_pool

Expected: app
Given: default

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions