Skip to content

Commit

Permalink
add missing exit codes to ensure Symfony 5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaicher committed Oct 27, 2019
1 parent d389f32 commit 7634bb3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
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 @@ -57,7 +57,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 @@ -124,6 +124,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 @@ -64,5 +64,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()
{
$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

0 comments on commit 7634bb3

Please sign in to comment.