[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


 Description   

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->addNamespace('Doctrine\ORM\Mapping');
$reader = new \Doctrine\Common\Annotations\CachedReader($reader, new ArrayCache());



 Comments   
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 Thu Aug 21 12:11:46 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.