Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3380 relocate to debug namespace #183

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/dist/aliases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ commands:
- rod
router:rebuild:
- ror
site:debug:
debug:site:
- sd
site:install:
- si
Expand Down
6 changes: 3 additions & 3 deletions services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ services:
tags:
- { name: drupal.command }
console.settings_debug:
class: Drupal\Console\Core\Command\Settings\DebugCommand
class: Drupal\Console\Core\Command\Debug\SettingsCommand
arguments: ['@console.configuration_manager', '@console.nested_array']
tags:
- { name: drupal.command }
Expand All @@ -74,12 +74,12 @@ services:
tags:
- { name: drupal.command }
console.chain_debug:
class: Drupal\Console\Core\Command\Chain\ChainDebugCommand
class: Drupal\Console\Core\Command\Debug\ChainCommand
arguments: ['@console.chain_discovery']
tags:
- { name: drupal.command }
console.site_debug:
class: Drupal\Console\Core\Command\Site\DebugCommand
class: Drupal\Console\Core\Command\Debug\SiteCommand
arguments: ['@console.configuration_manager']
tags:
- { name: drupal.command }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/**
* @file
* Contains \Drupal\Console\Core\Command\Chain\ChainDebugCommand.
* Contains \Drupal\Console\Core\Command\Debug\ChainCommand.
*/

namespace Drupal\Console\Core\Command\Chain;
namespace Drupal\Console\Core\Command\Debug;

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -15,11 +15,11 @@
use Drupal\Console\Core\Command\Shared\CommandTrait;

/**
* Class ChainDebugCommand
* Class ChainCommand
*
* @package Drupal\Console\Core\Command\Chain
* @package Drupal\Console\Core\Command\Debug
*/
class ChainDebugCommand extends Command
class ChainCommand extends Command
{
use CommandTrait;

Expand All @@ -29,7 +29,7 @@ class ChainDebugCommand extends Command
protected $chainDiscovery;

/**
* ChainDebugCommand constructor.
* ChainCommand constructor.
*
* @param ChainDiscovery $chainDiscovery
*/
Expand All @@ -47,8 +47,8 @@ public function __construct(
protected function configure()
{
$this
->setName('chain:debug')
->setDescription($this->trans('commands.chain.debug.description'));
->setName('debug:chain')
->setDescription($this->trans('commands.debug.chain.description'));
}

/**
Expand All @@ -60,11 +60,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
$files = $this->chainDiscovery->getChainFiles();

foreach ($files as $directory => $chainFiles) {
$io->info($this->trans('commands.chain.debug.messages.directory'), false);
$io->info($this->trans('commands.debug.chain.messages.directory'), false);
$io->comment($directory);

$tableHeader = [
$this->trans('commands.chain.debug.messages.file')
$this->trans('commands.debug.chain.messages.file')
];

$tableRows = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/**
* @file
* Contains \Drupal\Console\Core\Command\Settings\DebugCommand.
* Contains \Drupal\Console\Core\Command\Debug\SettingsCommand.
*/

namespace Drupal\Console\Core\Command\Settings;
namespace Drupal\Console\Core\Command\Debug;

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -16,11 +16,11 @@
use Drupal\Console\Core\Style\DrupalStyle;

/**
* Class DebugCommand
* Class SettingsCommand
*
* @package Drupal\Console\Core\Command\Settings
*/
class DebugCommand extends Command
class SettingsCommand extends Command
{
use CommandTrait;

Expand Down Expand Up @@ -55,8 +55,8 @@ public function __construct(
protected function configure()
{
$this
->setName('settings:debug')
->setDescription($this->trans('commands.settings.debug.description'));
->setName('debug:settings')
->setDescription($this->trans('commands.debug.settings.description'));
}

/**
Expand Down Expand Up @@ -85,8 +85,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
);

$tableHeader = [
$this->trans('commands.settings.debug.messages.config-key'),
$this->trans('commands.settings.debug.messages.config-value'),
$this->trans('commands.debug.settings.messages.config-key'),
$this->trans('commands.debug.settings.messages.config-value'),
];

$tableRows = [];
Expand All @@ -101,7 +101,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$io->info(
sprintf(
'%s :',
$this->trans('commands.settings.debug.messages.config-file')
$this->trans('commands.debug.settings.messages.config-file')
),
false
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/**
* @file
* Contains \Drupal\Console\Core\Command\Site\DebugCommand.
* Contains \Drupal\Console\Core\Command\Debug\SiteCommand.
*/

namespace Drupal\Console\Core\Command\Site;
namespace Drupal\Console\Core\Command\Debug;

use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -17,11 +17,11 @@
use Drupal\Console\Core\Style\DrupalStyle;

/**
* Class SiteDebugCommand
* Class SiteCommand
*
* @package Drupal\Console\Core\Command\Site
* @package Drupal\Console\Core\Command\Debug
*/
class DebugCommand extends Command
class SiteCommand extends Command
{
use CommandTrait;

Expand All @@ -31,7 +31,7 @@ class DebugCommand extends Command
protected $configurationManager;

/**
* DebugCommand constructor.
* SiteCommand constructor.
*
* @param ConfigurationManager $configurationManager
*/
Expand All @@ -48,21 +48,21 @@ public function __construct(
public function configure()
{
$this
->setName('site:debug')
->setDescription($this->trans('commands.site.debug.description'))
->setName('debug:site')
->setDescription($this->trans('commands.debug.site.description'))
->addArgument(
'target',
InputArgument::OPTIONAL,
$this->trans('commands.site.debug.options.target'),
$this->trans('commands.debug.site.options.target'),
null
)
->addArgument(
'property',
InputArgument::OPTIONAL,
$this->trans('commands.site.debug.options.property'),
$this->trans('commands.debug.site.options.property'),
null
)
->setHelp($this->trans('commands.site.debug.help'));
->setHelp($this->trans('commands.debug.site.help'));
}

/**
Expand All @@ -75,7 +75,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$sites = array_keys($this->configurationManager->getSites());

if (!$sites) {
$io->error($this->trans('commands.site.debug.messages.invalid-sites'));
$io->error($this->trans('commands.debug.site.messages.invalid-sites'));

return 1;
}
Expand All @@ -85,7 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$target = $input->getArgument('target');
if (!$target) {
$tableHeader =[
$this->trans('commands.site.debug.messages.site'),
$this->trans('commands.debug.site.messages.site'),
];

$io->table($tableHeader, $sites);
Expand All @@ -95,7 +95,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$targetConfig = $this->configurationManager->readTarget($target);
if (!$targetConfig) {
$io->error($this->trans('commands.site.debug.messages.invalid-site'));
$io->error($this->trans('commands.debug.site.messages.invalid-site'));

return 1;
}
Expand Down