Release 1.6.1 (#1282)

This commit is contained in:
Kevin Papst
2019-11-26 17:22:31 +01:00
committed by GitHub
parent 724eb9c658
commit 5ee0396a02
27 changed files with 240 additions and 112 deletions

View File

@@ -136,12 +136,6 @@ final class InstallCommand extends Command
protected function createDatabase(SymfonyStyle $io, InputInterface $input, OutputInterface $output)
{
if (!$this->connection->isConnected() && !$this->connection->connect()) {
throw new \Exception(
sprintf('Database connection could not be established: %s', $this->connection->getDatabase())
);
}
if ($this->connection->isConnected()) {
$io->note(sprintf('Database is existing and connection could be established'));
@@ -153,7 +147,11 @@ final class InstallCommand extends Command
}
$command = $this->getApplication()->find('doctrine:database:create');
$command->run(new ArrayInput([]), $output);
$result = $command->run(new ArrayInput(['--if-not-exists' => true]), $output);
if (0 !== $result) {
throw new \Exception('Failed creating database. Check your credentials in DATABASE_URL');
}
}
/**