diff --git a/src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php b/src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php index 954b034ace4e..34a0d03a5785 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php +++ b/src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php @@ -75,6 +75,9 @@ protected function execute(InputInterface $input, OutputInterface $output) } else { $destPath .= '/Resources/config/doctrine/metadata'; } + if ($type === 'yaml') { + $type = 'yml'; + } $cme = new ClassMetadataExporter(); $exporter = $cme->getExporter($type); @@ -100,7 +103,7 @@ protected function execute(InputInterface $input, OutputInterface $output) 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 %s', $path)); $code = $exporter->exportClassMetadata($class);