X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FCommand%2FInstallCommand.php;h=49c84178fa109d353d318647a9a7283e04cb3c09;hb=1e0d8ad7b728f6fb2cd886526b0fb84ef803e84f;hp=dec2bf9c15c7e6477a65b088a20fb3c6b3212c05;hpb=773ac5b0f7a56ff2527601498b0822d6ef8bfa40;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index dec2bf9c..49c84178 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -64,7 +64,7 @@ class InstallCommand extends ContainerAwareCommand ; $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() @@ -81,7 +81,7 @@ class InstallCommand extends ContainerAwareCommand $status = 'OK!'; $help = ''; - if (!extension_loaded($this->getContainer()->getParameter('database_driver'))) { + if (!\extension_loaded($this->getContainer()->getParameter('database_driver'))) { $fulfilled = false; $status = 'ERROR!'; $help = 'Database driver "' . $this->getContainer()->getParameter('database_driver') . '" is not installed.'; @@ -94,8 +94,9 @@ class InstallCommand extends ContainerAwareCommand $status = 'OK!'; $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') @@ -146,7 +147,7 @@ class InstallCommand extends ContainerAwareCommand $status = 'OK!'; $help = ''; - if (!function_exists($functionRequired)) { + if (!\function_exists($functionRequired)) { $fulfilled = false; $status = 'ERROR!'; $help = 'You need the ' . $functionRequired . ' function activated'; @@ -371,7 +372,7 @@ class InstallCommand extends ContainerAwareCommand } 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 @@ -389,6 +390,6 @@ class InstallCommand extends ContainerAwareCommand { $schemaManager = $this->getContainer()->get('doctrine')->getManager()->getConnection()->getSchemaManager(); - return count($schemaManager->listTableNames()) > 0 ? true : false; + return \count($schemaManager->listTableNames()) > 0 ? true : false; } }