DDC-3983: Replace metadata factory with pre-runtime (constructor-injected) metadata map #4863

Open
opened 2026-01-22 14:50:49 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 7, 2015).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user @ocramius:

ORM metadata is currently "lazy" by default:

  • we inject a metadata driver in the metadata factory
  • the metadata is mutable, which is causing big headaches
  • the mix of metadata drivers and ORM functionality makes functional tests around mapping

Instead, we can:

  • inject the metadata in the ORM entry point ( EntityManager::**construct() or equivalent)
  • make the metadata lazy (if needed)
  • make the metadata a simple Map<ClassName, ClassMetadata>

Doing this allows us to completely externalize the mapping drivers, so that they can be maintained by third parties.

This change requires DCOM-308 to be implemented first, as that is the metadata structure that we want to reach first.

Originally created by @doctrinebot on GitHub (Nov 7, 2015). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user @ocramius: ORM metadata is currently "lazy" by default: - we inject a metadata driver in the metadata factory - the metadata is mutable, which is causing big headaches - the mix of metadata drivers and ORM functionality makes functional tests around mapping Instead, we can: - inject the metadata in the ORM entry point ( `EntityManager::**construct()` or equivalent) - make the metadata lazy (if needed) - make the metadata a simple `Map<ClassName, ClassMetadata>` Doing this allows us to completely externalize the mapping drivers, so that they can be maintained by third parties. This change requires [DCOM-308](http://www.doctrine-project.org/jira/browse/DCOM-308) to be implemented first, as that is the metadata structure that we want to reach first.
admin added the New Feature label 2026-01-22 14:50:49 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4863