Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing exit codes to ensure Symfony 5 compatibility #3706

Merged
merged 1 commit into from
Oct 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$fileNames = $input->getArgument('file');

if ($fileNames === null) {
return null;
return 0;
}

foreach ((array) $fileNames as $fileName) {
Expand Down Expand Up @@ -133,6 +133,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}

return null;
return 0;
}
}
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$output->write(Dumper::dump($resultSet, (int) $depth));

return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ public function testSelectStatementsPrintsResult() : void
{
$this->expectConnectionFetchAll();

$this->commandTester->execute([
$exitCode = $this->commandTester->execute([
'command' => $this->command->getName(),
'sql' => 'SELECT 1',
]);
$this->assertSame(0, $exitCode);

self::assertRegExp('@int.*1.*@', $this->commandTester->getDisplay());
self::assertRegExp('@array.*1.*@', $this->commandTester->getDisplay());
Expand Down