Skip to content

Commit

Permalink
Fixing issue with .xml being hardcoded and converting yaml to yml for…
Browse files Browse the repository at this point in the history
… propert file extension.
  • Loading branch information
jwage authored and fabpot committed Aug 11, 2010
1 parent 373d05c commit dbc5249
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -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);
Expand All @@ -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 <comment>%s</comment>', $path));
$code = $exporter->exportClassMetadata($class);
Expand Down

0 comments on commit dbc5249

Please sign in to comment.