Skip to content

Commit

Permalink
[console] Added the ContainerAwareCommand extension to commands that …
Browse files Browse the repository at this point in the history
…have services (#4034)
  • Loading branch information
hjuarez20 authored and enzolutions committed May 14, 2019
1 parent b0a15c9 commit 8b2753d
Show file tree
Hide file tree
Showing 17 changed files with 16 additions and 34 deletions.
2 changes: 0 additions & 2 deletions src/Command/Generate/AjaxCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Command\Shared\ConfirmationTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Generator\AjaxCommandGenerator;
Expand All @@ -27,7 +26,6 @@
class AjaxCommand extends Command
{
use ModuleTrait;
use ServicesTrait;
use ConfirmationTrait;

/**
Expand Down
2 changes: 0 additions & 2 deletions src/Command/Generate/AuthenticationProviderCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Generator\AuthenticationProviderGenerator;
Expand All @@ -21,7 +20,6 @@

class AuthenticationProviderCommand extends Command
{
use ServicesTrait;
use ModuleTrait;
use ConfirmationTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/CacheContextCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Drupal\Console\Command\Shared\ConfirmationTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Command\ContainerAwareCommand;
use Drupal\Console\Core\Utils\ChainQueue;
use Drupal\Console\Core\Utils\StringConverter;
use Drupal\Console\Generator\CacheContextGenerator;
Expand All @@ -20,7 +20,7 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class CacheContextCommand extends Command
class CacheContextCommand extends ContainerAwareCommand
{
use ModuleTrait;
use ConfirmationTrait;
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/CommandCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ExtensionTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Command\ContainerAwareCommand;
use Drupal\Console\Core\Utils\StringConverter;
use Drupal\Console\Generator\CommandGenerator;
use Drupal\Console\Extension\Manager;
Expand All @@ -21,7 +21,7 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class CommandCommand extends Command
class CommandCommand extends ContainerAwareCommand
{
use ConfirmationTrait;
use ServicesTrait;
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/ControllerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Generator\ControllerGenerator;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Command\ContainerAwareCommand;
use Drupal\Console\Core\Command\Shared\InputTrait;
use Drupal\Console\Core\Utils\ChainQueue;
use Drupal\Console\Core\Utils\StringConverter;
Expand All @@ -22,7 +22,7 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class ControllerCommand extends Command
class ControllerCommand extends ContainerAwareCommand
{
use ModuleTrait;
use ServicesTrait;
Expand Down
2 changes: 0 additions & 2 deletions src/Command/Generate/EntityBundleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Console\Command\Shared\ConfirmationTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Generator\EntityBundleGenerator;
use Drupal\Console\Extension\Manager;
use Drupal\Console\Utils\Validator;

class EntityBundleCommand extends Command
{
use ModuleTrait;
use ServicesTrait;
use ConfirmationTrait;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/EventSubscriberCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Drupal\Console\Command\Shared\EventsTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Command\ContainerAwareCommand;
use Drupal\Console\Core\Utils\ChainQueue;
use Drupal\Console\Core\Utils\StringConverter;
use Drupal\Console\Extension\Manager;
Expand All @@ -22,7 +22,7 @@
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;

class EventSubscriberCommand extends Command
class EventSubscriberCommand extends ContainerAwareCommand
{
use EventsTrait;
use ServicesTrait;
Expand Down
2 changes: 0 additions & 2 deletions src/Command/Generate/FormAlterCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Console\Generator\FormAlterGenerator;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\FormTrait;
use Drupal\Console\Command\Shared\ConfirmationTrait;
Expand All @@ -32,7 +31,6 @@ class FormAlterCommand extends Command
use ArrayInputTrait;
use FormTrait;
use ModuleTrait;
use ServicesTrait;

/**
* @var Manager
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/FormCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\MenuTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Command\ContainerAwareCommand;
use Drupal\Console\Core\Utils\ChainQueue;
use Drupal\Console\Core\Utils\StringConverter;
use Drupal\Console\Generator\FormGenerator;
Expand All @@ -25,7 +25,7 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

abstract class FormCommand extends Command
abstract class FormCommand extends ContainerAwareCommand
{
use ArrayInputTrait;
use FormTrait;
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginBlockCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Drupal\Console\Command\Shared\ConfirmationTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Command\ContainerAwareCommand;
use Drupal\Console\Core\Utils\StringConverter;
use Drupal\Console\Core\Utils\ChainQueue;
use Drupal\Console\Generator\PluginBlockGenerator;
Expand All @@ -25,7 +25,7 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class PluginBlockCommand extends Command
class PluginBlockCommand extends ContainerAwareCommand
{
use ArrayInputTrait;
use ServicesTrait;
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginMailCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Generator\PluginMailGenerator;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Command\ContainerAwareCommand;
use Drupal\Console\Core\Utils\StringConverter;
use Drupal\Console\Core\Utils\ChainQueue;
use Drupal\Console\Extension\Manager;
Expand All @@ -25,7 +25,7 @@
*
* @package Drupal\Console\Command\Generate
*/
class PluginMailCommand extends Command
class PluginMailCommand extends ContainerAwareCommand
{
use ServicesTrait;
use ModuleTrait;
Expand Down
2 changes: 0 additions & 2 deletions src/Command/Generate/PluginRulesActionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Drupal\Console\Command\Shared\ArrayInputTrait;
use Drupal\Console\Command\Shared\ConfirmationTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Utils\StringConverter;
use Drupal\Console\Core\Utils\ChainQueue;
Expand All @@ -32,7 +31,6 @@ class PluginRulesActionCommand extends Command
use ArrayInputTrait;
use ConfirmationTrait;
use ModuleTrait;
use ServicesTrait;

/**
* @var Manager
Expand Down
2 changes: 0 additions & 2 deletions src/Command/Generate/PluginRulesConditionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Drupal\Console\Command\Shared\ArrayInputTrait;
use Drupal\Console\Command\Shared\ConfirmationTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Utils\StringConverter;
use Drupal\Console\Core\Utils\ChainQueue;
Expand All @@ -32,7 +31,6 @@ class PluginRulesConditionCommand extends Command
use ArrayInputTrait;
use ConfirmationTrait;
use ModuleTrait;
use ServicesTrait;

/**
* @var Manager
Expand Down
2 changes: 0 additions & 2 deletions src/Command/Generate/PluginRulesDataprocessorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

use Drupal\Console\Command\Shared\ConfirmationTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Utils\StringConverter;
use Drupal\Console\Core\Utils\ChainQueue;
Expand All @@ -30,7 +29,6 @@ class PluginRulesDataprocessorCommand extends Command

use ConfirmationTrait;
use ModuleTrait;
use ServicesTrait;

/**
* @var Manager
Expand Down
2 changes: 0 additions & 2 deletions src/Command/Generate/PluginTypeAnnotationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Extension\Manager;
Expand All @@ -25,7 +24,6 @@
*/
class PluginTypeAnnotationCommand extends Command
{
use ServicesTrait;
use ModuleTrait;

/**
Expand Down
2 changes: 0 additions & 2 deletions src/Command/Generate/PluginTypeYamlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Extension\Manager;
Expand All @@ -25,7 +24,6 @@
*/
class PluginTypeYamlCommand extends Command
{
use ServicesTrait;
use ModuleTrait;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/TwigExtensionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Drupal\Console\Command\Shared\ConfirmationTrait;
use Drupal\Console\Command\Shared\ModuleTrait;
use Drupal\Console\Command\Shared\ServicesTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Command\ContainerAwareCommand;
use Drupal\Console\Core\Utils\ChainQueue;
use Drupal\Console\Core\Utils\StringConverter;
use Drupal\Console\Extension\Manager;
Expand All @@ -25,7 +25,7 @@
*
* @package Drupal\Console\Command\Generate
*/
class TwigExtensionCommand extends Command
class TwigExtensionCommand extends ContainerAwareCommand
{
use ModuleTrait;
use ServicesTrait;
Expand Down

0 comments on commit 8b2753d

Please sign in to comment.