mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1565: ClassMetadataInfo must implements the Doctrine\Common\Persistence\Mapping\ClassMetadata interface #1962
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.