Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-1893

Doctrine\ORM\Mapping\Driver\AnnotationDriver::create() not updated for new annotation readers

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: Mapping Drivers
    • Security Level: All
    • 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());

        Activity

        Hide
        ocramius Marco Pivetta added a comment -

        Looking into this today

        Show
        ocramius Marco Pivetta added a comment - Looking into this today
        Hide
        beberlei Benjamin Eberlei added a comment -

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

        Show
        beberlei Benjamin Eberlei added a comment - $config->newDefaultAnnotationDriver should have a flag for picking the simple or the "ORM " prefixed reader
        Show
        ocramius Marco Pivetta added a comment - Handled in DDC-1915 ( https://github.com/doctrine/doctrine2/pull/396 )

          People

          • Assignee:
            beberlei Benjamin Eberlei
            Reporter:
            vasekpurchart VaĊĦek Purchart
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: