;
$this->io->success('Wallabag has been successfully installed.');
- $this->io->note('Just execute `php bin/console server:run --env=prod` for using wallabag: http://localhost:8000');
+ $this->io->success('You can now configure your web server, see https://doc.wallabag.org');
}
protected function checkRequirements()
$status = '<info>OK!</info>';
$help = '';
- if (!extension_loaded($this->getContainer()->getParameter('database_driver'))) {
+ if (!\extension_loaded($this->getContainer()->getParameter('database_driver'))) {
$fulfilled = false;
$status = '<error>ERROR!</error>';
$help = 'Database driver "' . $this->getContainer()->getParameter('database_driver') . '" is not installed.';
$status = '<info>OK!</info>';
$help = '';
+ $conn = $this->getContainer()->get('doctrine')->getManager()->getConnection();
+
try {
- $conn = $this->getContainer()->get('doctrine')->getManager()->getConnection();
$conn->connect();
} catch (\Exception $e) {
if (false === strpos($e->getMessage(), 'Unknown database')
$status = '<info>OK!</info>';
$help = '';
- if (!function_exists($functionRequired)) {
+ if (!\function_exists($functionRequired)) {
$fulfilled = false;
$status = '<error>ERROR!</error>';
$help = 'You need the ' . $functionRequired . ' function activated';
$question->setHidden(true);
$user->setPlainPassword($this->io->askQuestion($question));
- $user->setEmail($this->io->ask('Email', ''));
+ $user->setEmail($this->io->ask('Email', 'wallabag@wallabag.io'));
$user->setEnabled(true);
$user->addRole('ROLE_SUPER_ADMIN');
}
try {
- return in_array($databaseName, $schemaManager->listDatabases(), true);
+ return \in_array($databaseName, $schemaManager->listDatabases(), true);
} catch (\Doctrine\DBAL\Exception\DriverException $e) {
// it means we weren't able to get database list, assume the database doesn't exist
{
$schemaManager = $this->getContainer()->get('doctrine')->getManager()->getConnection()->getSchemaManager();
- return count($schemaManager->listTableNames()) > 0 ? true : false;
+ return \count($schemaManager->listTableNames()) > 0 ? true : false;
}
}