Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b1b633c

Browse filesBrowse files
gnat42fabpot
authored andcommitted
fix output file name
1 parent 1bc973e commit b1b633c
Copy full SHA for b1b633c

File tree

Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed

‎src/Symfony/Bundle/DoctrineBundle/Command/ConvertDoctrine1SchemaDoctrineCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DoctrineBundle/Command/ConvertDoctrine1SchemaDoctrineCommand.php
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
8080
$destPath .= '/Resources/config/doctrine/metadata';
8181
}
8282

83+
// adjust so file naming works
84+
if ($type === 'yaml') {
85+
$type = 'yml';
86+
}
87+
8388
$cme = new ClassMetadataExporter();
8489
$exporter = $cme->getExporter($type);
8590

@@ -99,7 +104,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
99104
if ($type === 'annotation') {
100105
$path = $destPath.'/'.$className.'.php';
101106
} else {
102-
$path = $destPath.'/'.str_replace('\\', '.', $class->name).'.dcm.xml';
107+
$path = $destPath.'/'.str_replace('\\', '.', $class->name).'.dcm.'.$type;
103108
}
104109
$output->writeln(sprintf(' > writing <comment>%s</comment>', $path));
105110
$code = $exporter->exportClassMetadata($class);
@@ -109,4 +114,4 @@ protected function execute(InputInterface $input, OutputInterface $output)
109114
$output->writeln('Database does not have any mapping information.'.PHP_EOL, 'ERROR');
110115
}
111116
}
112-
}
117+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.