diff --git a/config/services/drupal-console/debug.yml b/config/services/drupal-console/debug.yml index c6768337f..85408050f 100644 --- a/config/services/drupal-console/debug.yml +++ b/config/services/drupal-console/debug.yml @@ -35,3 +35,8 @@ services: class: Drupal\Console\Command\Debug\ViewsPluginsCommand tags: - { name: drupal.command } + console.state_debug: + class: Drupal\Console\Command\Debug\StateCommand + arguments: ['@state', '@keyvalue'] + tags: + - { name: drupal.command } diff --git a/config/services/drupal-console/state.yml b/config/services/drupal-console/state.yml index 546996688..be8572157 100644 --- a/config/services/drupal-console/state.yml +++ b/config/services/drupal-console/state.yml @@ -1,9 +1,4 @@ services: - console.state_debug: - class: Drupal\Console\Command\State\DebugCommand - arguments: ['@state', '@keyvalue'] - tags: - - { name: drupal.command } console.state_delete: class: Drupal\Console\Command\State\DeleteCommand arguments: ['@state', '@keyvalue'] diff --git a/src/Command/State/DebugCommand.php b/src/Command/Debug/StateCommand.php similarity index 79% rename from src/Command/State/DebugCommand.php rename to src/Command/Debug/StateCommand.php index 9a4f81f87..d4ccd2663 100644 --- a/src/Command/State/DebugCommand.php +++ b/src/Command/Debug/StateCommand.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Console\Command\State\DebugCommand. + * Contains \Drupal\Console\Command\Debug\DebugCommand. */ -namespace Drupal\Console\Command\State; +namespace Drupal\Console\Command\Debug; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -20,9 +20,9 @@ /** * Class DebugCommand * - * @package Drupal\Console\Command\State + * @package Drupal\Console\Command\Debug */ -class DebugCommand extends Command +class StateCommand extends Command { use CommandTrait; @@ -57,13 +57,13 @@ public function __construct( protected function configure() { $this - ->setName('state:debug') - ->setDescription($this->trans('commands.state.debug.description')) - ->setHelp($this->trans('commands.state.debug.help')) + ->setName('debug:state') + ->setDescription($this->trans('commands.debug.state.description')) + ->setHelp($this->trans('commands.debug.state.help')) ->addArgument( 'key', InputArgument::OPTIONAL, - $this->trans('commands.state.debug.arguments.key') + $this->trans('commands.debug.state.arguments.key') ); } @@ -82,7 +82,7 @@ protected function execute(InputInterface $input, OutputInterface $output) return 0; } - $tableHeader = [$this->trans('commands.state.debug.messages.key')]; + $tableHeader = [$this->trans('commands.debug.state.messages.key')]; $keyStoreStates = array_keys($this->keyValue->get('state')->getAll()); $io->table($tableHeader, $keyStoreStates);