瀏覽代碼

[DoctrineBundle] added the possibility to disable a bundle when using auto_mapping

orm:
    auto_mapping: true
    mappings:
         FOSUserBundle: false
Fabien Potencier 14 年之前
父節點
當前提交
c846990459

+ 4 - 0
src/Symfony/Bundle/DoctrineAbstractBundle/DependencyInjection/AbstractDoctrineExtension.php

@@ -52,6 +52,10 @@ abstract class AbstractDoctrineExtension extends Extension
         }
 
         foreach ($objectManager['mappings'] as $mappingName => $mappingConfig) {
+            if (false === $mappingConfig) {
+                continue;
+            }
+
             $mappingConfig = array_replace(array(
                 'dir'    => false,
                 'type'   => false,