[DDC-1893] Doctrine\ORM\Mapping\Driver\AnnotationDriver::create() not updated for new annotation readers Created: 26/Jun/12  Updated: 08/Jul/12  Resolved: 08/Jul/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Mapping Drivers
Affects Version/s: 2.2
Fix Version/s: 2.3
Security Level: All

Type: Bug Priority: Minor
Reporter: VaĊĦek Purchart Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


After refactoring of annotation readers, there are new defaults and the current implementation calls undefined method, because Doctrine\Common\Annotations\AnnotationReader has been refactored too. The new way should be probably requiring Doctrine\Common\Annotations\Reader interface as $reader parameter and if not present constructing the default as in Doctrine\ORM\Configuration::create :

AnnotationRegistry::registerFile(_DIR_ . '/Mapping/Driver/DoctrineAnnotations.php');

$reader = new \Doctrine\Common\Annotations\SimpleAnnotationReader();
$reader = new \Doctrine\Common\Annotations\CachedReader($reader, new ArrayCache());

Comment by Marco Pivetta [ 06/Jul/12 ]

Looking into this today

Comment by Benjamin Eberlei [ 06/Jul/12 ]

$config->newDefaultAnnotationDriver should have a flag for picking the simple or the "ORM
" prefixed reader

Comment by Marco Pivetta [ 08/Jul/12 ]

Handled in DDC-1915 (https://github.com/doctrine/doctrine2/pull/396)

Generated at Fri Aug 28 18:36:03 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.