->setupDatabase()
->setupAdmin()
->setupConfig()
- ->setupAsset()
;
$output->writeln('<info>Wallabag has been successfully installed.</info>');
protected function checkRequirements()
{
- $this->defaultOutput->writeln('<info><comment>Step 1 of 5.</comment> Checking system requirements.</info>');
+ $this->defaultOutput->writeln('<info><comment>Step 1 of 4.</comment> Checking system requirements.</info>');
$fulfilled = true;
protected function setupDatabase()
{
- $this->defaultOutput->writeln('<info><comment>Step 2 of 5.</comment> Setting up database.</info>');
+ $this->defaultOutput->writeln('<info><comment>Step 2 of 4.</comment> Setting up database.</info>');
// user want to reset everything? Don't care about what is already here
if (true === $this->defaultInput->getOption('reset')) {
protected function setupAdmin()
{
- $this->defaultOutput->writeln('<info><comment>Step 3 of 5.</comment> Administration setup.</info>');
+ $this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>');
$questionHelper = $this->getHelperSet()->get('question');
$question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true);
protected function setupConfig()
{
- $this->defaultOutput->writeln('<info><comment>Step 4 of 5.</comment> Config setup.</info>');
+ $this->defaultOutput->writeln('<info><comment>Step 4 of 4.</comment> Config setup.</info>');
$em = $this->getContainer()->get('doctrine.orm.entity_manager');
// cleanup before insert new stuff
return $this;
}
- protected function setupAsset()
- {
- $this->defaultOutput->writeln('<info><comment>Step 5 of 5.</comment> Installing assets.</info>');
-
- $this
- ->runCommand('assets:install')
- ->runCommand('assetic:dump')
- ;
-
- $this->defaultOutput->writeln('');
-
- return $this;
- }
-
/**
* Run a command.
*
try {
return in_array($databaseName, $schemaManager->listDatabases());
- } catch (\Doctrine\DBAL\Exception\ConnectionException $e) {
+ } catch (\Doctrine\DBAL\Exception\DriverException $e) {
// it means we weren't able to get database list, assume the database doesn't exist
return false;