Security update for Core, with self-updated composer
[yaffs-website] / vendor / drupal / console / src / Command / Features / ImportCommand.php
index 275859fb1a53c89f5de01a2c67a7c72bdd95ef4d..b9760bd1480ca2fcfb2542675b963cb7355a2cd4 100644 (file)
@@ -12,10 +12,8 @@ use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
 use Drupal\Console\Command\Shared\FeatureTrait;
-use Drupal\Console\Core\Command\Shared\CommandTrait;
-use Drupal\Console\Core\Style\DrupalStyle;
 use Drupal\Console\Annotations\DrupalCommand;
-use Symfony\Component\Console\Command\Command;
+use Drupal\Console\Core\Command\Command;
 
 /**
  * @DrupalCommand(
@@ -26,7 +24,6 @@ use Symfony\Component\Console\Command\Command;
 
 class ImportCommand extends Command
 {
-    use CommandTrait;
     use FeatureTrait;
 
     public function __construct()
@@ -49,13 +46,12 @@ class ImportCommand extends Command
                 'packages',
                 InputArgument::IS_ARRAY,
                 $this->trans('commands.features.import.arguments.packages')
-            );
+            )->setAliases(['fei']);
+        ;
     }
 
     protected function execute(InputInterface $input, OutputInterface $output)
     {
-        $io = new DrupalStyle($input, $output);
-
         $packages = $input->getArgument('packages');
         $bundle = $input->getOption('bundle');
       
@@ -64,7 +60,7 @@ class ImportCommand extends Command
         }
       
         $this->getAssigner($bundle);
-        $this->importFeature($io, $packages);
+        $this->importFeature($packages);
     }
 
     /**
@@ -72,15 +68,12 @@ class ImportCommand extends Command
      */
     protected function interact(InputInterface $input, OutputInterface $output)
     {
-        $io = new DrupalStyle($input, $output);
-
         $packages = $input->getArgument('packages');
         $bundle = $input->getOption('bundle');
-        
-        if (!$packages && !$bundle) {
+        if (!$packages) {
             // @see Drupal\Console\Command\Shared\FeatureTrait::packageQuestion
-            $bundle = $this->packageQuestion($io);
-            $input->setArgument('packages', $bundle);
+            $package = $this->packageQuestion($bundle);
+            $input->setArgument('packages', $package);
         }
     }
 }