]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Command/InstallCommand.php
add test for removeWww Twig Extension
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Command / InstallCommand.php
index 29d91109e48d6608c15bae42a0f84149318cc09a..1bd76ae36ec9db535b68ce33926d09228a886eec 100644 (file)
@@ -273,10 +273,11 @@ class InstallCommand extends ContainerAwareCommand
      */
     private function isDatabasePresent()
     {
-        $databaseName = $this->getContainer()->getParameter('database_name');
+        $connection = $this->getContainer()->get('doctrine')->getManager()->getConnection();
+        $databaseName = $connection->getDatabase();
 
         try {
-            $schemaManager = $this->getContainer()->get('doctrine')->getManager()->getConnection()->getSchemaManager();
+            $schemaManager = $connection->getSchemaManager();
         } catch (\Exception $exception) {
             if (false !== strpos($exception->getMessage(), sprintf("Unknown database '%s'", $databaseName))) {
                 return false;