Skip to content

Commit

Permalink
Merge branch '6.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Apr 19, 2017
2 parents 9da3a8b + 7750edd commit 079a2fb
Showing 1 changed file with 14 additions and 6 deletions.
Expand Up @@ -85,7 +85,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
$type = $input->getArgument('type');
$installer = $this->getInstaller($type);
if ($installer === false) {
$output->writeln("Unknown install type '$type'");
$output->writeln(
"Unknown install type '$type', available options in currently installed eZ Platform package: " .
implode(', ', array_keys($this->installers))
);
exit(self::EXIT_UNKNOWN_INSTALL_TYPE);
}

Expand All @@ -110,7 +113,7 @@ private function checkParameters()
{
$parametersFile = 'app/config/parameters.yml';
if (!is_file($parametersFile)) {
$this->output->writeln("Required configuration file $parametersFile not found");
$this->output->writeln("Required configuration file '$parametersFile' not found");
exit(self::EXIT_PARAMETERS_NOT_FOUND);
}
}
Expand Down Expand Up @@ -146,17 +149,22 @@ private function checkDatabase()
exit(self::EXIT_DATABASE_NOT_FOUND_ERROR);
}
} catch (ConnectionException $e) {
$this->output->writeln('An error occured connecting to the database:');
$this->output->writeln('An error occurred connecting to the database:');
$this->output->writeln($e->getMessage());
$this->output->writeln('Please check the database configuration in parameters.yml');
$this->output->writeln("Please check the database configuration in 'app/config/parameters.yml'");
exit(self::EXIT_GENERAL_DATABASE_ERROR);
}
}

private function cacheClear(OutputInterface $output)
{
if (!is_writable($this->cacheDir)) {
throw new \RuntimeException(sprintf('Unable to write in the "%s" directory', $this->cacheDir));
throw new \RuntimeException(
sprintf(
'Unable to write in the "%s" directory, check install doc on disk permissions before you continue.',
$this->cacheDir
)
);
}

$output->writeln(sprintf('Clearing cache for directory <info>%s</info>', $this->cacheDir));
Expand Down Expand Up @@ -208,7 +216,7 @@ private function getInstaller($type)
/**
* Executes a Symfony command in separate process.
*
* Typically usefull when configuration has changed, our you are outside of Symfony context (Composer commands).
* Typically useful when configuration has changed, or you are outside of Symfony context (Composer commands).
*
* Based on {@see \Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::executeCommand}.
*
Expand Down

0 comments on commit 079a2fb

Please sign in to comment.