فهرست منبع

Fixing issue with .xml being hardcoded and converting yaml to yml for propert file extension.

Jonathan H. Wage 15 سال پیش
والد
کامیت
dbc5249f88
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php

+ 4 - 1
src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php

@@ -75,6 +75,9 @@ EOT
         } else {
             $destPath .= '/Resources/config/doctrine/metadata';
         }
+        if ($type === 'yaml') {
+            $type = 'yml';
+        }
 
         $cme = new ClassMetadataExporter();
         $exporter = $cme->getExporter($type);
@@ -100,7 +103,7 @@ EOT
                 if ($type === 'annotation') {
                     $path = $destPath.'/'.$className.'.php';
                 } else {
-                    $path = $destPath.'/'.str_replace('\\', '.', $class->name).'.dcm.xml';
+                    $path = $destPath.'/'.str_replace('\\', '.', $class->name).'.dcm.'.$type;
                 }
                 $output->writeln(sprintf('  > writing <comment>%s</comment>', $path));
                 $code = $exporter->exportClassMetadata($class);