mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 17:33:15 +02:00
DDC-1565: ClassMetadataInfo must implements the Doctrine\Common\Persistence\Mapping\ClassMetadata interface #1965
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 (Dec 25, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user dunglas:
The
doctrine:generate:entitiescommand from Symfony 2 fails when using Doctrine Extensions (i.e. Timestampable) with this error :[ErrorException]
Catchable Fatal Error: Argument 2 passed to Gedmo\Mapping\MappedEventSubscriber::loadMetadataForObjectClass() must implement interface Doctrine\Common\Persistence\Mapping\ClassMetadata, instance of Doctrine\ORM\Mapping\ClassMetadataInfo given, called in /Users/dunglas/Documents/workspace/DoctrineExtensions/lib/Gedmo/Timestampable/TimestampableListener.php on line 44 and defined in /Users/dunglas/Documents/workspace/DoctrineExtensions/lib/Gedmo/Mapping/MappedEventSubscriber.php line 171
The error should also occurs without using Symfony because it's related to Doctrine and Doctrine Extensions.
In Doctrine MongoDB ODM this is
ClassMetadataInfothat implements theDoctrine\Common\Persistence\Mapping\ClassMetadataand the problem does not occurs.To do this the
getIdentifierValuesmethod ofClassMetadatamust be moved toClassMetadataInfo.@doctrinebot commented on GitHub (Dec 28, 2011):
Comment created by @beberlei:
getIdentifierValues() uses reflection, and reflection code is exclusively in ClassMetadata.
The code here smells badly related to this distinction but i havent came up with a refactoring yet that solves this mess.
@doctrinebot commented on GitHub (Dec 29, 2011):
Comment created by @beberlei:
This is foremost a bug in Gedmos library, he hints for a ClassMetadata where none is expected.
@doctrinebot commented on GitHub (Dec 29, 2011):
Issue was closed with resolution "Can't Fix"