Security update for Core, with self-updated composer
[yaffs-website] / vendor / drupal / console / src / Command / Shared / ConnectTrait.php
index 61d38b7fd8849f6cb21efbe43f2872c99e79ee76..c4eff2153b3f332b7faf6fc75c47c35e9e6bc46d 100644 (file)
@@ -7,19 +7,18 @@
 
 namespace Drupal\Console\Command\Shared;
 
-use Drupal\Console\Core\Style\DrupalStyle;
 use Drupal\Core\Database\Database;
 
 trait ConnectTrait
 {
     protected $supportedDrivers = ['mysql','pgsql'];
 
-    public function resolveConnection(DrupalStyle $io, $database = 'default')
+    public function resolveConnection($database = 'default')
     {
         $connectionInfo = Database::getConnectionInfo();
 
         if (!$connectionInfo || !isset($connectionInfo[$database])) {
-            $io->error(
+            $this->getIo()->error(
                 sprintf(
                     $this->trans('commands.database.connect.messages.database-not-found'),
                     $database
@@ -31,7 +30,7 @@ trait ConnectTrait
 
         $databaseConnection = $connectionInfo[$database];
         if (!in_array($databaseConnection['driver'], $this->supportedDrivers)) {
-            $io->error(
+            $this->getIo()->error(
                 sprintf(
                     $this->trans('commands.database.connect.messages.database-not-supported'),
                     $databaseConnection['driver']