|
@@ -80,6 +80,11 @@ EOT
|
|
|
$destPath .= '/Resources/config/doctrine/metadata';
|
|
|
}
|
|
|
|
|
|
+ // adjust so file naming works
|
|
|
+ if ($type === 'yaml') {
|
|
|
+ $type = 'yml';
|
|
|
+ }
|
|
|
+
|
|
|
$cme = new ClassMetadataExporter();
|
|
|
$exporter = $cme->getExporter($type);
|
|
|
|
|
@@ -99,7 +104,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);
|
|
@@ -109,4 +114,4 @@ EOT
|
|
|
$output->writeln('Database does not have any mapping information.'.PHP_EOL, 'ERROR');
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+}
|