Skip to content

Commit

Permalink
Merge pull request #1170 from doctrine/dbal-2.12-runsql-command-fix
Browse files Browse the repository at this point in the history
Add minimal compatibility with changes in DBAL 2.11 RunSqlCommand
  • Loading branch information
ostrolucky committed May 21, 2020
2 parents 65bb2eb + 86d2469 commit 8db5b22
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Command/Proxy/RunSqlDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@ protected function configure()

$this
->setName('doctrine:query:sql')
->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command')
->setHelp(<<<EOT
The <info>%command.name%</info> command executes the given SQL query and
outputs the results:
<info>php %command.full_name% "SELECT * FROM users"</info>
EOT
);

if ($this->getDefinition()->hasOption('connection')) {
return;
}

$this->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command');
}

/**
Expand Down

0 comments on commit 8db5b22

Please sign in to comment.