Skip to content

Commit

Permalink
Fix graphviz:generate command
Browse files Browse the repository at this point in the history
The method AbstractCommand::getSchema() take a string, not the Input object
  • Loading branch information
GromNaN committed Nov 24, 2012
1 parent 14fadf5 commit 0d4adf1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/Propel/Generator/Command/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ protected function getBuildProperties($file)
return $properties;
}

/**
* Find every schema files.
*
* @param string|array $directory Path to the input directory
* @return array List of schema files
*/
protected function getSchemas($directory)
{
$finder = new Finder();
Expand Down
2 changes: 1 addition & 1 deletion src/Propel/Generator/Command/GraphvizGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$manager = new GraphvizManager();
$manager->setGeneratorConfig($generatorConfig);
$manager->setSchemas($this->getSchemas($input));
$manager->setSchemas($this->getSchemas($input->getOption('input-dir')));
$manager->setLoggerClosure(function($message) use ($input, $output) {
if ($input->getOption('verbose')) {
$output->writeln($message);
Expand Down

0 comments on commit 0d4adf1

Please sign in to comment.