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 Bug
    • Status: Resolved
    • Priority: Minor 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
        Marco Pivetta added a comment -
        Show
        Marco Pivetta added a comment - Handled in DDC-1915 ( https://github.com/doctrine/doctrine2/pull/396 )
        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - $config->newDefaultAnnotationDriver should have a flag for picking the simple or the "ORM " prefixed reader
        Hide
        Marco Pivetta added a comment -

        Looking into this today

        Show
        Marco Pivetta added a comment - Looking into this today

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Vašek Purchart
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: