Security update for Core, with self-updated composer
[yaffs-website] / vendor / drupal / console / src / Command / Database / DatabaseLogBase.php
index f0d8e5056e9362b0935ebf61bf88088c3091ee86..7004ed0aa417932f259ad22e35f2c626fbcc0108 100644 (file)
@@ -7,21 +7,19 @@
 
 namespace Drupal\Console\Command\Database;
 
-use Drupal\Console\Core\Command\Shared\CommandTrait;
 use Drupal\Core\Database\Connection;
 use Drupal\Core\Datetime\DateFormatterInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\StringTranslation\TranslatableMarkup;
 use Drupal\Core\StringTranslation\TranslationInterface;
 use Drupal\user\UserStorageInterface;
-use Symfony\Component\Console\Command\Command;
+use Drupal\Console\Core\Command\Command;
 use Drupal\Core\Logger\RfcLogLevel;
 use Drupal\user\Entity\User;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Component\Utility\Html;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Input\InputInterface;
-use Drupal\Console\Core\Style\DrupalStyle;
 
 /**
  * Class DatabaseLogBase
@@ -30,8 +28,6 @@ use Drupal\Console\Core\Style\DrupalStyle;
  */
 abstract class DatabaseLogBase extends Command
 {
-    use CommandTrait;
-
     /**
      * @var Connection
      */
@@ -137,12 +133,11 @@ abstract class DatabaseLogBase extends Command
     }
 
     /**
-     * @param DrupalStyle $io
      * @param null        $offset
      * @param int         $range
      * @return bool|\Drupal\Core\Database\Query\SelectInterface
      */
-    protected function makeQuery(DrupalStyle $io, $offset = null, $range = 1000)
+    protected function makeQuery($offset = null, $range = 1000)
     {
         $query = $this->database->select('watchdog', 'w');
         $query->fields(
@@ -164,7 +159,7 @@ abstract class DatabaseLogBase extends Command
 
         if ($this->eventSeverity) {
             if (!in_array($this->eventSeverity, $this->severityList)) {
-                $io->error(
+                $this->getIo()->error(
                     sprintf(
                         $this->trans('database.log.common.messages.invalid-severity'),
                         $this->eventSeverity