Преглед изворни кода

[DoctrineBundle]fixed defect in doctrine:generate:entity where xml extension was added to all mapping types

IamPersistent пре 15 година
родитељ
комит
7287913bc6

+ 2 - 1
src/Symfony/Bundle/DoctrineBundle/Command/GenerateEntityDoctrineCommand.php

@@ -111,7 +111,8 @@ EOT
 
             $exporter->setEntityGenerator($this->getEntityGenerator());
         } else {
-            $path = $dirs[$namespace].'/'.$bundle.'/Resources/config/doctrine/metadata/'.str_replace('\\', '.', $fullEntityClassName).'.dcm.xml';
+            $mappingType = $mappingType=='yaml' ? 'yml' : $mappingType;
+            $path = $dirs[$namespace].'/'.$bundle.'/Resources/config/doctrine/metadata/'.str_replace('\\', '.', $fullEntityClassName).'.dcm.'.$mappingType;
         }
 
         $code = $exporter->exportClassMetadata($class);