mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Introducing a compile step for Metadata #7559
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @beberlei on GitHub (Oct 8, 2025).
Originally assigned to: @mpdude on GitHub.
To improve validation and make metadata use faster and more reliable we want to introduce a compile step for metadata.
For this the ORM would need to have 2 "run modes" similar to Symfony, we introduce a debug mode true/false. This is already publically available in the Setup Tools, but not kept around in configuration for now.
What I think needs to be done (in random order)
ClassMetadataFactory::getAllMetadata2. post validation across all metadata 3. writing them to disk. Use Symfony Var Exporter for this like here: https://gist.github.com/beberlei/2dc2ef300fb252342f0a6dc4a99b1de7ClassMetadatas.ClassMetadatasfor an entry. If there is no cache built, throw exception, unless debug mode, then generate the complete metadata cache.