Security update for Core, with self-updated composer
[yaffs-website] / vendor / drupal / console / src / Command / Cron / ReleaseCommand.php
index 2fa9541ad813332b3176858861f51b0cafc64154..cc3fa6120f68fd923208e07099b9d921fc63e9fa 100644 (file)
@@ -10,16 +10,12 @@ namespace Drupal\Console\Command\Cron;
 use Symfony\Component\Config\Definition\Exception\Exception;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Command\Command;
+use Drupal\Console\Core\Command\Command;
 use Drupal\Core\Lock\LockBackendInterface;
 use Drupal\Console\Core\Utils\ChainQueue;
-use Drupal\Console\Core\Command\Shared\CommandTrait;
-use Drupal\Console\Core\Style\DrupalStyle;
 
 class ReleaseCommand extends Command
 {
-    use CommandTrait;
-
     /**
      * @var LockBackendInterface
      */
@@ -52,7 +48,8 @@ class ReleaseCommand extends Command
     {
         $this
             ->setName('cron:release')
-            ->setDescription($this->trans('commands.cron.release.description'));
+            ->setDescription($this->trans('commands.cron.release.description'))
+            ->setAliases(['cror']);
     }
 
     /**
@@ -60,14 +57,12 @@ class ReleaseCommand extends Command
      */
     protected function execute(InputInterface $input, OutputInterface $output)
     {
-        $io = new DrupalStyle($input, $output);
-
         try {
             $this->lock->release('cron');
 
-            $io->info($this->trans('commands.cron.release.messages.released'));
+            $this->getIo()->info($this->trans('commands.cron.release.messages.released'));
         } catch (Exception $e) {
-            $io->error($e->getMessage());
+            $this->getIo()->error($e->getMessage());
 
             return 1;
         }