mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3512: Redesign ClassMetadata API as ValueObject based (for type-safety and self-documentation) #4326
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 @doctrinebot on GitHub (Jan 17, 2015).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user @ocramius:
The current ClassMetadata API is based on a lot of array juggling (for performance reasons).
While that was understandable with PHP 5.3, all the array access operations are currently:
I suggest re-coding the ClassMetadata internals (public properties and such) so that well-described properties are defined.
Additionally, as a bonus, we'd get a performance boost by just moving all the class-alias and type resolution logic from the runtime into the ClassMetadataFactory (or similar) API, saving tons of performance at every run.
In pseudo-logic, what I'd like to achieve with DDC-3512 is:
onLoadMetadataevent is fired for each loaded metadata instanceClassMetadataFactorylogiconCompleteMetadataevent is fired for each loaded metadata instanceThis would make metadata manipulation from events a bit messier (user needs to know which value to change during which event), but would allow using better constrained metadata structures in future, and that would disallow mistakes during event listeners execution as well (internal validation).
@doctrinebot commented on GitHub (Jan 17, 2015):
@guilhermeblanco commented on GitHub (Jan 4, 2017):
This is already under work as part of 3.0 efforts. Closing for now.