diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-06-01 07:58:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-01 07:58:17 +0200 |
commit | 2a0eec07a5630401a9ceb7add65604f79238f10c (patch) | |
tree | bab2f2f763d4dca9f273a8ec1848f5da6c03ed20 /src/Wallabag/CoreBundle/Command/InstallCommand.php | |
parent | 757ec837bea7f57dcefb71b3b90c66299ed6a922 (diff) | |
parent | 7ab5eb9508921d84b4b4ec84a59135d536da748e (diff) | |
download | wallabag-2a0eec07a5630401a9ceb7add65604f79238f10c.tar.gz wallabag-2a0eec07a5630401a9ceb7add65604f79238f10c.tar.zst wallabag-2a0eec07a5630401a9ceb7add65604f79238f10c.zip |
Merge pull request #3137 from aaa2000/isolated-tests
Isolated tests
Diffstat (limited to 'src/Wallabag/CoreBundle/Command/InstallCommand.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Command/InstallCommand.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 0d9364f6..d9608246 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -499,20 +499,18 @@ class InstallCommand extends ContainerAwareCommand | |||
499 | $output = new BufferedOutput(); | 499 | $output = new BufferedOutput(); |
500 | $exitCode = $this->getApplication()->run(new ArrayInput($parameters), $output); | 500 | $exitCode = $this->getApplication()->run(new ArrayInput($parameters), $output); |
501 | 501 | ||
502 | // PDO does not always close the connection after Doctrine commands. | ||
503 | // See https://github.com/symfony/symfony/issues/11750. | ||
504 | $this->getContainer()->get('doctrine')->getManager()->getConnection()->close(); | ||
505 | |||
502 | if (0 !== $exitCode) { | 506 | if (0 !== $exitCode) { |
503 | $this->getApplication()->setAutoExit(true); | 507 | $this->getApplication()->setAutoExit(true); |
504 | 508 | ||
505 | $this->defaultOutput->writeln(''); | 509 | throw new \RuntimeException( |
506 | $this->defaultOutput->writeln('<error>The command "'.$command.'" generates some errors: </error>'); | 510 | 'The command "'.$command."\" generates some errors: \n\n" |
507 | $this->defaultOutput->writeln($output->fetch()); | 511 | .$output->fetch()); |
508 | |||
509 | die(); | ||
510 | } | 512 | } |
511 | 513 | ||
512 | // PDO does not always close the connection after Doctrine commands. | ||
513 | // See https://github.com/symfony/symfony/issues/11750. | ||
514 | $this->getContainer()->get('doctrine')->getManager()->getConnection()->close(); | ||
515 | |||
516 | return $this; | 514 | return $this; |
517 | } | 515 | } |
518 | 516 | ||