Follow-up of #2124 (entity auto-discovery): assuming #2277 passes, it allows cutting down some existing logic:
alias feeds a write-only API — nothing reads entity namespaces in ORM 3 anymore (Bridge's $aliasMap already deprecated in 8.1),
- The entire bundle-detection tree (
auto_mapping, is_bundle, relative dirs, detectMetadataDriver, mapping: false, ... ~250 lines) becomes redundant: DoctrineOrmMappingsPass covers bundles, auto_discover_entities covers apps. Precedent: controller_resolver.auto_mapping, removed 3.0 → 4.0.
mappings key survives with its simplest form — {type, absolute dir, prefix}.
About auto_mapping specifically: this key auto-registers entities for registered bundles. It's old (2011), lost its main purpose in 2017 when the app stopped being a bundle, and is largely superseded by DoctrineOrmMappingsPass for bundles that self-register. It has the exact same parallel life as auto_discover_entities. Can be a good candidate to disappear in next major?
Suggested path — deprecate in 3.x, remove in 4.0:
Follow-up of #2124 (entity auto-discovery): assuming #2277 passes, it allows cutting down some existing logic:
aliasfeeds a write-only API — nothing reads entity namespaces in ORM 3 anymore (Bridge's$aliasMapalready deprecated in 8.1),auto_mapping,is_bundle, relative dirs,detectMetadataDriver,mapping: false, ... ~250 lines) becomes redundant:DoctrineOrmMappingsPasscovers bundles,auto_discover_entitiescovers apps. Precedent:controller_resolver.auto_mapping, removed 3.0 → 4.0.mappingskey survives with its simplest form —{type, absolute dir, prefix}.About
auto_mappingspecifically: this key auto-registers entities for registered bundles. It's old (2011), lost its main purpose in 2017 when the app stopped being a bundle, and is largely superseded byDoctrineOrmMappingsPassfor bundles that self-register. It has the exact same parallel life asauto_discover_entities. Can be a good candidate to disappear in next major?Suggested path — deprecate in 3.x, remove in 4.0:
alias(independent — dead code already, can start now)auto_mapping,is_bundle, relative dirs,mapping: false) — once Addauto_discover_entitiesoption to register entities discovered by the container scan #2277 is mergedauto_mapping: truefrom the doctrine-bundle recipe, aligned with the deprecating releasemappingsdown to{type, absolute dir, prefix}