Преглед на файлове

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

IamPersistent преди 15 години
родител
ревизия
7287913bc6
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      src/Symfony/Bundle/DoctrineBundle/Command/GenerateEntityDoctrineCommand.php

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