Pārlūkot izejas kodu

fixes issue when using default doctrine configuration:
Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The annotation "@Entity" in class (...) was never imported.

Mathias Verraes 14 gadi atpakaļ
vecāks
revīzija
0594ee99c9
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      lib/Gedmo/Mapping/MappedEventSubscriber.php

+ 1 - 0
lib/Gedmo/Mapping/MappedEventSubscriber.php

@@ -200,6 +200,7 @@ abstract class MappedEventSubscriber implements EventSubscriber
                     'Gedmo\\Mapping\\Annotation',
                     'Gedmo\\Mapping\\Annotation',
                     __DIR__ . '/../../'
                     __DIR__ . '/../../'
                 );
                 );
+                $reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\');
                 $reader = new \Doctrine\Common\Annotations\CachedReader($reader, new ArrayCache());
                 $reader = new \Doctrine\Common\Annotations\CachedReader($reader, new ArrayCache());
             } else if (version_compare(\Doctrine\Common\Version::VERSION, '2.1.0-BETA3-DEV', '>=')) {
             } else if (version_compare(\Doctrine\Common\Version::VERSION, '2.1.0-BETA3-DEV', '>=')) {
                 $reader = new \Doctrine\Common\Annotations\AnnotationReader();
                 $reader = new \Doctrine\Common\Annotations\AnnotationReader();