Procházet zdrojové kódy

[DoctrineBundle] made a temporary fix to force Doctrine annotations to be loaded (closes #1077)

Fabien Potencier před 14 roky
rodič
revize
0b9f3d8eb6

+ 7 - 0
src/Symfony/Bundle/DoctrineBundle/DoctrineBundle.php

@@ -30,4 +30,11 @@ class DoctrineBundle extends Bundle
 
         $container->addCompilerPass(new RegisterEventListenersAndSubscribersPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION);
     }
+
+    public function boot()
+    {
+        // force Doctrine annotations to be loaded
+        // should be removed when a better solution is found in Doctrine
+        class_exists('Doctrine\ORM\Mapping\Driver\AnnotationDriver');
+    }
 }