Bladeren bron

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

Fabien Potencier 14 jaren geleden
bovenliggende
commit
0b9f3d8eb6
1 gewijzigde bestanden met toevoegingen van 7 en 0 verwijderingen
  1. 7 0
      src/Symfony/Bundle/DoctrineBundle/DoctrineBundle.php

+ 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');
+    }
 }