diff --git a/config/services/drupal-console/debug.yml b/config/services/drupal-console/debug.yml
index 85408050f..22881be1d 100644
--- a/config/services/drupal-console/debug.yml
+++ b/config/services/drupal-console/debug.yml
@@ -40,3 +40,33 @@ services:
arguments: ['@state', '@keyvalue']
tags:
- { name: drupal.command }
+ console.theme_debug:
+ class: Drupal\Console\Command\Debug\ThemeCommand
+ arguments: ['@config.factory', '@theme_handler']
+ tags:
+ - { name: drupal.command }
+ console.router_debug:
+ class: Drupal\Console\Command\Debug\RouterCommand
+ arguments: ['@router.route_provider']
+ tags:
+ - { name: drupal.command }
+ console.queue_debug:
+ class: Drupal\Console\Command\Debug\QueueCommand
+ arguments: ['@plugin.manager.queue_worker']
+ tags:
+ - { name: drupal.command }
+ console.libraries_debug:
+ class: Drupal\Console\Command\Debug\LibrariesCommand
+ arguments: ['@module_handler', '@theme_handler', '@library.discovery', '@app.root']
+ tags:
+ - { name: drupal.command }
+ console.module_debug:
+ class: Drupal\Console\Command\Debug\ModuleCommand
+ arguments: ['@console.configuration_manager', '@console.site', '@http_client']
+ tags:
+ - { name: drupal.command }
+ console.image_styles_debug:
+ class: Drupal\Console\Command\Debug\ImageStylesCommand
+ arguments: ['@entity_type.manager']
+ tags:
+ - { name: drupal.command }
diff --git a/config/services/drupal-console/image.yml b/config/services/drupal-console/image.yml
index d3c5f2d73..73b5c566a 100644
--- a/config/services/drupal-console/image.yml
+++ b/config/services/drupal-console/image.yml
@@ -1,9 +1,4 @@
services:
- console.image_styles_debug:
- class: Drupal\Console\Command\Image\StylesDebugCommand
- arguments: ['@entity_type.manager']
- tags:
- - { name: drupal.command }
console.image_styles_flush:
class: Drupal\Console\Command\Image\StylesFlushCommand
arguments: ['@entity_type.manager']
diff --git a/config/services/drupal-console/libraries.yml b/config/services/drupal-console/libraries.yml
deleted file mode 100644
index 65bb723f7..000000000
--- a/config/services/drupal-console/libraries.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-services:
- console.libraries_debug:
- class: Drupal\Console\Command\Libraries\DebugCommand
- arguments: ['@module_handler', '@theme_handler', '@library.discovery', '@app.root']
- tags:
- - { name: drupal.command }
diff --git a/config/services/drupal-console/module.yml b/config/services/drupal-console/module.yml
index 8c79ef33c..4dc3b48f7 100644
--- a/config/services/drupal-console/module.yml
+++ b/config/services/drupal-console/module.yml
@@ -1,9 +1,4 @@
services:
- console.module_debug:
- class: Drupal\Console\Command\Module\DebugCommand
- arguments: ['@console.configuration_manager', '@console.site', '@http_client']
- tags:
- - { name: drupal.command }
console.module_dependency_install:
class: Drupal\Console\Command\Module\InstallDependencyCommand
arguments: ['@console.site', '@console.validator', '@module_installer', '@console.chain_queue']
diff --git a/config/services/drupal-console/queue.yml b/config/services/drupal-console/queue.yml
index e73b124a1..fc41033fc 100644
--- a/config/services/drupal-console/queue.yml
+++ b/config/services/drupal-console/queue.yml
@@ -1,9 +1,4 @@
services:
- console.queue_debug:
- class: Drupal\Console\Command\Queue\DebugCommand
- arguments: ['@plugin.manager.queue_worker']
- tags:
- - { name: drupal.command }
console.queue_run:
class: Drupal\Console\Command\Queue\RunCommand
arguments: ['@plugin.manager.queue_worker', '@queue']
diff --git a/config/services/drupal-console/router.yml b/config/services/drupal-console/router.yml
index 62304e501..4076dc6fd 100644
--- a/config/services/drupal-console/router.yml
+++ b/config/services/drupal-console/router.yml
@@ -1,9 +1,4 @@
services:
- console.router_debug:
- class: Drupal\Console\Command\Router\DebugCommand
- arguments: ['@router.route_provider']
- tags:
- - { name: drupal.command }
console.router_rebuild:
class: Drupal\Console\Command\Router\RebuildCommand
arguments: ['@router.builder']
diff --git a/config/services/drupal-console/theme.yml b/config/services/drupal-console/theme.yml
index abe36c413..be708bf19 100644
--- a/config/services/drupal-console/theme.yml
+++ b/config/services/drupal-console/theme.yml
@@ -1,9 +1,4 @@
services:
- console.theme_debug:
- class: Drupal\Console\Command\Theme\DebugCommand
- arguments: ['@config.factory', '@theme_handler']
- tags:
- - { name: drupal.command }
console.theme_download:
class: Drupal\Console\Command\Theme\DownloadCommand
arguments: ['@console.drupal_api', '@http_client', '@app.root']
diff --git a/src/Command/Image/StylesDebugCommand.php b/src/Command/Debug/ImageStylesCommand.php
similarity index 76%
rename from src/Command/Image/StylesDebugCommand.php
rename to src/Command/Debug/ImageStylesCommand.php
index 92e548f28..a330ebbaa 100644
--- a/src/Command/Image/StylesDebugCommand.php
+++ b/src/Command/Debug/ImageStylesCommand.php
@@ -2,10 +2,10 @@
/**
* @file
- * Contains \Drupal\Console\Command\Image\StylesDebugCommand.
+ * Contains \Drupal\Console\Command\Debug\ImageStylesCommand.
*/
-namespace Drupal\Console\Command\Image;
+namespace Drupal\Console\Command\Debug;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -17,9 +17,9 @@
/**
* Class StylesDebugCommand
*
- * @package Drupal\Console\Command\Image
+ * @package Drupal\Console\Command\Debug
*/
-class StylesDebugCommand extends Command
+class ImageStylesCommand extends Command
{
use CommandTrait;
@@ -29,7 +29,7 @@ class StylesDebugCommand extends Command
protected $entityTypeManager;
/**
- * StylesDebugCommand constructor.
+ * ImageStylesCommand constructor.
*
* @param EntityTypeManagerInterface $entityTypeManager
*/
@@ -45,8 +45,8 @@ public function __construct(EntityTypeManagerInterface $entityTypeManager)
protected function configure()
{
$this
- ->setName('image:styles:debug')
- ->setDescription($this->trans('commands.image.styles.debug.description'));
+ ->setName('debug:image:styles')
+ ->setDescription($this->trans('commands.debug.image.styles.description'));
}
/**
@@ -60,7 +60,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$io->newLine();
$io->comment(
- $this->trans('commands.image.styles.debug.messages.styles-list')
+ $this->trans('commands.debug.image.styles.messages.styles-list')
);
if ($imageStyle) {
@@ -77,8 +77,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
protected function imageStyleList(DrupalStyle $io, $imageStyle)
{
$tableHeader = [
- $this->trans('commands.image.styles.debug.messages.styles-name'),
- $this->trans('commands.image.styles.debug.messages.styles-label')
+ $this->trans('commands.debug.image.styles.messages.styles-name'),
+ $this->trans('commands.debug.image.styles.messages.styles-label')
];
$tableRows = [];
diff --git a/src/Command/Libraries/DebugCommand.php b/src/Command/Debug/LibrariesCommand.php
similarity index 88%
rename from src/Command/Libraries/DebugCommand.php
rename to src/Command/Debug/LibrariesCommand.php
index bfa501f63..b1a3c85cf 100644
--- a/src/Command/Libraries/DebugCommand.php
+++ b/src/Command/Debug/LibrariesCommand.php
@@ -2,10 +2,10 @@
/**
* @file
- * Contains \Drupal\Console\Command\Libraries\DebugCommand.
+ * Contains \Drupal\Console\Command\Debug\LibrariesCommand.
*/
-namespace Drupal\Console\Command\Libraries;
+namespace Drupal\Console\Command\Debug;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
@@ -18,7 +18,7 @@
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Style\DrupalStyle;
-class DebugCommand extends Command
+class LibrariesCommand extends Command
{
use CommandTrait;
@@ -69,12 +69,12 @@ public function __construct(
protected function configure()
{
$this
- ->setName('libraries:debug')
- ->setDescription($this->trans('commands.libraries.debug.description'))
+ ->setName('debug:libraries')
+ ->setDescription($this->trans('commands.debug.libraries.description'))
->addArgument(
'group',
InputArgument::OPTIONAL,
- $this->trans('commands.libraries.debug.options.name')
+ $this->trans('commands.debug.libraries.options.name')
);
}
@@ -90,7 +90,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$groups = $this->getAllLibraries();
$tableHeader = [
- $this->trans('commands.libraries.debug.messages.name'),
+ $this->trans('commands.debug.libraries.messages.name'),
];
$io->table($tableHeader, $groups, 'compact');
diff --git a/src/Command/Module/DebugCommand.php b/src/Command/Debug/ModuleCommand.php
similarity index 78%
rename from src/Command/Module/DebugCommand.php
rename to src/Command/Debug/ModuleCommand.php
index 0a48170b1..ee1b8f6c2 100644
--- a/src/Command/Module/DebugCommand.php
+++ b/src/Command/Debug/ModuleCommand.php
@@ -2,10 +2,10 @@
/**
* @file
- * Contains \Drupal\Console\Command\Module\DebugCommand.
+ * Contains \Drupal\Console\Command\Debug\ModuleCommand.
*/
-namespace Drupal\Console\Command\Module;
+namespace Drupal\Console\Command\Debug;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
@@ -18,7 +18,7 @@
use GuzzleHttp\Client;
use Drupal\Console\Core\Utils\ConfigurationManager;
-class DebugCommand extends Command
+class ModuleCommand extends Command
{
use CommandTrait;
@@ -60,24 +60,24 @@ public function __construct(
protected function configure()
{
$this
- ->setName('module:debug')
- ->setDescription($this->trans('commands.module.debug.description'))
+ ->setName('debug:module')
+ ->setDescription($this->trans('commands.debug.module.description'))
->addArgument(
'module',
InputArgument::OPTIONAL | InputArgument::IS_ARRAY,
- $this->trans('commands.module.debug.module')
+ $this->trans('commands.debug.module.module')
)
->addOption(
'status',
null,
InputOption::VALUE_OPTIONAL,
- $this->trans('commands.module.debug.options.status')
+ $this->trans('commands.debug.module.options.status')
)
->addOption(
'type',
null,
InputOption::VALUE_OPTIONAL,
- $this->trans('commands.module.debug.options.type')
+ $this->trans('commands.debug.module.options.type')
)
->setAliases(['mod']);
}
@@ -108,7 +108,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
} catch (\Exception $e) {
$io->error(
sprintf(
- $this->trans('commands.module.debug.messages.no-results'),
+ $this->trans('commands.debug.module.messages.no-results'),
$module
)
);
@@ -127,17 +127,17 @@ protected function execute(InputInterface $input, OutputInterface $output)
];
$tableRows[] = [
- ''.$this->trans('commands.module.debug.messages.total-downloads').'',
+ ''.$this->trans('commands.debug.module.messages.total-downloads').'',
$data->package->downloads->total
];
$tableRows[] = [
- ''.$this->trans('commands.module.debug.messages.total-monthly').'',
+ ''.$this->trans('commands.debug.module.messages.total-monthly').'',
$data->package->downloads->monthly
];
$tableRows[] = [
- ''.$this->trans('commands.module.debug.messages.total-daily').'',
+ ''.$this->trans('commands.debug.module.messages.total-daily').'',
$data->package->downloads->daily
];
@@ -163,13 +163,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
$tableHeader = [
- $this->trans('commands.module.debug.messages.id'),
- $this->trans('commands.module.debug.messages.name'),
- $this->trans('commands.module.debug.messages.package'),
- $this->trans('commands.module.debug.messages.version'),
- $this->trans('commands.module.debug.messages.schema-version'),
- $this->trans('commands.module.debug.messages.status'),
- $this->trans('commands.module.debug.messages.origin'),
+ $this->trans('commands.debug.module.messages.id'),
+ $this->trans('commands.debug.module.messages.name'),
+ $this->trans('commands.debug.module.messages.package'),
+ $this->trans('commands.debug.module.messages.version'),
+ $this->trans('commands.debug.module.messages.schema-version'),
+ $this->trans('commands.debug.module.messages.status'),
+ $this->trans('commands.debug.module.messages.origin'),
];
$tableRows = [];
@@ -183,7 +183,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
continue;
}
- $module_status = ($module->status) ? $this->trans('commands.module.debug.messages.installed') : $this->trans('commands.module.debug.messages.uninstalled');
+ $module_status = ($module->status) ? $this->trans('commands.debug.module.messages.installed') : $this->trans('commands.debug.module.messages.uninstalled');
$module_origin = ($module->origin) ? $module->origin : 'no core';
$schema_version = (drupal_get_installed_schema_version($module_id)!= -1?drupal_get_installed_schema_version($module_id): '');
diff --git a/src/Command/Queue/DebugCommand.php b/src/Command/Debug/QueueCommand.php
similarity index 78%
rename from src/Command/Queue/DebugCommand.php
rename to src/Command/Debug/QueueCommand.php
index 8ed257067..13a051cf3 100644
--- a/src/Command/Queue/DebugCommand.php
+++ b/src/Command/Debug/QueueCommand.php
@@ -2,10 +2,10 @@
/**
* @file
- * Contains \Drupal\Console\Command\Queue\DebugCommand.
+ * Contains \Drupal\Console\Command\Debug\QueueCommand.
*/
-namespace Drupal\Console\Command\Queue;
+namespace Drupal\Console\Command\Debug;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
@@ -17,9 +17,9 @@
/**
* Class DebugCommand
*
- * @package Drupal\Console\Command\Queue
+ * @package Drupal\Console\Command\Debug
*/
-class DebugCommand extends Command
+class QueueCommand extends Command
{
use CommandTrait;
@@ -45,8 +45,8 @@ public function __construct(QueueWorkerManagerInterface $queueWorker)
protected function configure()
{
$this
- ->setName('queue:debug')
- ->setDescription($this->trans('commands.queue.debug.description'));
+ ->setName('debug:queue')
+ ->setDescription($this->trans('commands.debug.queue.description'));
}
/**
@@ -57,9 +57,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
$io = new DrupalStyle($input, $output);
$tableHeader = [
- $this->trans('commands.queue.debug.messages.queue'),
- $this->trans('commands.queue.debug.messages.items'),
- $this->trans('commands.queue.debug.messages.class')
+ $this->trans('commands.debug.queue.messages.queue'),
+ $this->trans('commands.debug.queue.messages.items'),
+ $this->trans('commands.debug.queue.messages.class')
];
$tableBody = $this->listQueues();
diff --git a/src/Command/Router/DebugCommand.php b/src/Command/Debug/RouterCommand.php
similarity index 78%
rename from src/Command/Router/DebugCommand.php
rename to src/Command/Debug/RouterCommand.php
index f73e44ad3..42e65ff33 100644
--- a/src/Command/Router/DebugCommand.php
+++ b/src/Command/Debug/RouterCommand.php
@@ -2,10 +2,10 @@
/**
* @file
- * Contains \Drupal\Console\Command\RouterDebugCommand.
+ * Contains \Drupal\Console\Command\Debug\RouterCommand.
*/
-namespace Drupal\Console\Command\Router;
+namespace Drupal\Console\Command\Debug;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
@@ -16,7 +16,7 @@
use Drupal\Console\Core\Style\DrupalStyle;
use Drupal\Component\Serialization\Yaml;
-class DebugCommand extends Command
+class RouterCommand extends Command
{
use CommandTrait;
@@ -39,12 +39,12 @@ public function __construct(RouteProviderInterface $routeProvider)
protected function configure()
{
$this
- ->setName('router:debug')
- ->setDescription($this->trans('commands.router.debug.description'))
+ ->setName('debug:router')
+ ->setDescription($this->trans('commands.debug.router.description'))
->addArgument(
'route-name',
InputArgument::OPTIONAL | InputArgument::IS_ARRAY,
- $this->trans('commands.router.debug.arguments.route-name')
+ $this->trans('commands.debug.router.arguments.route-name')
)
->setAliases(['rod']);
}
@@ -67,8 +67,8 @@ protected function getAllRoutes(DrupalStyle $io)
$routes = $this->routeProvider->getAllRoutes();
$tableHeader = [
- $this->trans('commands.router.debug.messages.name'),
- $this->trans('commands.router.debug.messages.path'),
+ $this->trans('commands.debug.router.messages.name'),
+ $this->trans('commands.debug.router.messages.path'),
];
$tableRows = [];
@@ -85,29 +85,29 @@ protected function getRouteByNames(DrupalStyle $io, $route_name)
foreach ($routes as $name => $route) {
$tableHeader = [
- $this->trans('commands.router.debug.messages.route'),
+ $this->trans('commands.debug.router.messages.route'),
''.$name.''
];
$tableRows = [];
$tableRows[] = [
- ''.$this->trans('commands.router.debug.messages.path').'',
+ ''.$this->trans('commands.debug.router.messages.path').'',
$route->getPath(),
];
- $tableRows[] = [''.$this->trans('commands.router.debug.messages.defaults').''];
+ $tableRows[] = [''.$this->trans('commands.debug.router.messages.defaults').''];
$attributes = $this->addRouteAttributes($route->getDefaults());
foreach ($attributes as $attribute) {
$tableRows[] = $attribute;
}
- $tableRows[] = [''.$this->trans('commands.router.debug.messages.requirements').''];
+ $tableRows[] = [''.$this->trans('commands.debug.router.messages.requirements').''];
$requirements = $this->addRouteAttributes($route->getRequirements());
foreach ($requirements as $requirement) {
$tableRows[] = $requirement;
}
- $tableRows[] = [''.$this->trans('commands.router.debug.messages.options').''];
+ $tableRows[] = [''.$this->trans('commands.debug.router.messages.options').''];
$options = $this->addRouteAttributes($route->getOptions());
foreach ($options as $option) {
$tableRows[] = $option;
diff --git a/src/Command/Theme/DebugCommand.php b/src/Command/Debug/ThemeCommand.php
similarity index 80%
rename from src/Command/Theme/DebugCommand.php
rename to src/Command/Debug/ThemeCommand.php
index bbdc531b5..3485e9100 100644
--- a/src/Command/Theme/DebugCommand.php
+++ b/src/Command/Debug/ThemeCommand.php
@@ -2,10 +2,10 @@
/**
* @file
- * Contains \Drupal\Console\Command\Theme\Debugommand.
+ * Contains \Drupal\Console\Command\Debug\ThemeCommand.
*/
-namespace Drupal\Console\Command\Theme;
+namespace Drupal\Console\Command\Debug;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
@@ -16,7 +16,7 @@
use Drupal\Core\Extension\ThemeHandler;
use Drupal\Console\Core\Style\DrupalStyle;
-class DebugCommand extends Command
+class ThemeCommand extends Command
{
use CommandTrait;
@@ -48,12 +48,12 @@ public function __construct(
protected function configure()
{
$this
- ->setName('theme:debug')
- ->setDescription($this->trans('commands.theme.debug.description'))
+ ->setName('debug:theme')
+ ->setDescription($this->trans('commands.debug.theme.description'))
->addArgument(
'theme',
InputArgument::OPTIONAL,
- $this->trans('commands.theme.debug.arguments.theme')
+ $this->trans('commands.debug.theme.arguments.theme')
)
->setAliases(['tde']);
}
@@ -73,10 +73,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
protected function themeList(DrupalStyle $io)
{
$tableHeader = [
- $this->trans('commands.theme.debug.messages.theme-id'),
- $this->trans('commands.theme.debug.messages.theme-name'),
- $this->trans('commands.theme.debug.messages.status'),
- $this->trans('commands.theme.debug.messages.version'),
+ $this->trans('commands.debug.theme.messages.theme-id'),
+ $this->trans('commands.debug.theme.messages.theme-name'),
+ $this->trans('commands.debug.theme.messages.status'),
+ $this->trans('commands.debug.theme.messages.version'),
];
$themes = $this->themeHandler->rebuildThemeData();
@@ -118,7 +118,7 @@ protected function themeDetail(DrupalStyle $io, $themeId)
$io->comment(
sprintf(
'%s : ',
- $this->trans('commands.theme.debug.messages.status')
+ $this->trans('commands.debug.theme.messages.status')
),
false
);
@@ -126,18 +126,18 @@ protected function themeDetail(DrupalStyle $io, $themeId)
$io->comment(
sprintf(
'%s : ',
- $this->trans('commands.theme.debug.messages.version')
+ $this->trans('commands.debug.theme.messages.version')
),
false
);
$io->writeln($theme->info['version']);
- $io->comment($this->trans('commands.theme.debug.messages.regions'));
+ $io->comment($this->trans('commands.debug.theme.messages.regions'));
$tableRows = $this->addThemeAttributes($theme->info['regions'], $tableRows);
$io->table([], $tableRows);
} else {
$io->error(
sprintf(
- $this->trans('commands.theme.debug.messages.invalid-theme'),
+ $this->trans('commands.debug.theme.messages.invalid-theme'),
$themeId
)
);
@@ -148,9 +148,9 @@ protected function getThemeStatus($theme)
{
$defaultTheme = $this->configFactory->get('system.theme')->get('default');
- $status = ($theme->status)?$this->trans('commands.theme.debug.messages.installed'):$this->trans('commands.theme.debug.messages.uninstalled');
+ $status = ($theme->status)?$this->trans('commands.debug.theme.messages.installed'):$this->trans('commands.debug.theme.messages.uninstalled');
if ($defaultTheme == $theme) {
- $status = $this->trans('commands.theme.debug.messages.default-theme');
+ $status = $this->trans('commands.debug.theme.messages.default-theme');
}
return $status;