Skip to content

Commit

Permalink
Fix configuration via the console helper provided by Doctrine DBAL
Browse files Browse the repository at this point in the history
The helper provided by Doctrine DBAL is named `connection`, not `db`.
  • Loading branch information
fabpot committed Jan 1, 2014
1 parent ce2ffa1 commit 5d83a66
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -78,8 +78,8 @@ protected function getMigrationConfiguration(InputInterface $input, OutputInterf
return $output->writeln($message);
});

if ($this->getApplication()->getHelperSet()->has('db')) {
$conn = $this->getHelper('db')->getConnection();
if ($this->getApplication()->getHelperSet()->has('connection')) {
$conn = $this->getHelper('connection')->getConnection();
} elseif ($input->getOption('db-configuration')) {
if ( ! file_exists($input->getOption('db-configuration'))) {
throw new \InvalidArgumentException("The specified connection file is not a valid file.");
Expand Down

0 comments on commit 5d83a66

Please sign in to comment.