mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #249] [MERGED] [DCOM-93] Remove Reflection dependency from ClassMetadata #7918
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?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/249
Author: @beberlei
Created: 1/2/2012
Status: ✅ Merged
Merged: 1/3/2012
Merged by: @beberlei
Base:
2.2← Head:DCOM-93📝 Commits (8)
9bdf9a9DCOM-93 - Adjust ClassMetadataFactory#getClassParents() to use reflection service.80408acDCOM-93 - Add empty initialize and wakeup methods.ea2d4e4DCOM-93 - Add ClassMetadataFactory#wakeupReflection implementation1cecc9cDCOM-93 - Factor out __wakeup into a delegate-method from ClassMetadataFactory#wakeupReflection to ClassMetadataInfo#wakeupReflectionc7d8c9fDCOM-93 - Factor out ClassMetadata constructor into delegate method initializeReflection76e4f5aDCOM-93 - Removed reflection dependency from ClassMetadata completly, moving all the code into ClassMetadataInfo for BC reasons.a07fc51DCOM-93 - Fix docblocksef8703eDCOM-93 - Allow to check testsuite with any constructor-less cache implementation📊 Changes
16 files changed (+478 additions, -399 deletions)
View changed files
📝
lib/Doctrine/ORM/Mapping/ClassMetadata.php(+1 -340)📝
lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(+65 -8)📝
lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php(+318 -4)📝
lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php(+3 -31)📝
lib/vendor/doctrine-common(+1 -1)📝
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC168Test.php(+1 -1)📝
tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php(+1 -0)📝
tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php(+2 -0)📝
tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php(+2 -1)📝
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataBuilderTest.php(+1 -0)📝
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php(+10 -8)📝
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php(+59 -2)📝
tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php(+2 -1)📝
tests/Doctrine/Tests/ORM/Proxy/ProxyClassGeneratorTest.php(+2 -0)📝
tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php(+5 -1)📝
tests/Doctrine/Tests/OrmFunctionalTestCase.php(+5 -1)📄 Description
The Reflection dependency leads to the annoying problem that we have the ClassMetadata deriving from ClassMetadataInfo. This is very bad OO code and has lead to problems on multiple occasions.
This PR removes the dependency by injecting a reflection service, which can be a Static Service not requiring the classes to exist.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.