Skip to content

Commit

Permalink
Tag release RC-6. (#2826)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas committed Oct 17, 2016
1 parent 8d0bb19 commit cda7f34
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 80 deletions.
20 changes: 10 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions config/services/drupal-console/misc.yml
Expand Up @@ -3,10 +3,6 @@ services:
class: Drupal\Console\Command\ContainerDebugCommand
tags:
- { name: drupal.command }
console.parameters_debug:
class: Drupal\Console\Command\ContainerParametersCommand
tags:
- { name: drupal.command }
console.plugin_debug:
class: Drupal\Console\Command\PluginDebugCommand
tags:
Expand Down
2 changes: 1 addition & 1 deletion src/Application.php
Expand Up @@ -22,7 +22,7 @@ class Application extends ConsoleApplication
/**
* @var string
*/
const VERSION = '1.0.0-rc5';
const VERSION = '1.0.0-rc6';

public function __construct(ContainerInterface $container)
{
Expand Down
38 changes: 37 additions & 1 deletion src/Command/ContainerDebugCommand.php
Expand Up @@ -10,6 +10,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Command\Shared\ContainerAwareCommandTrait;
use Drupal\Console\Style\DrupalStyle;
Expand All @@ -31,6 +32,12 @@ protected function configure()
$this
->setName('container:debug')
->setDescription($this->trans('commands.container.debug.description'))
->addOption(
'parameters',
null,
InputOption::VALUE_NONE,
$this->trans('commands.container.debug.arguments.service')
)
->addArgument(
'service',
InputArgument::OPTIONAL,
Expand All @@ -45,8 +52,17 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new DrupalStyle($input, $output);
$service = $input->getArgument('service');
$tableHeader = [];
$parameters = $input->getOption('parameters');

if ($parameters) {
$parameterList = $this->getParameterList();
ksort($parameterList);
$io->write(Yaml::dump(['parameters' => $parameterList], 4, 2));

return 0;
}

$tableHeader = [];
if ($service) {
$tableRows = $this->getServiceDetail($service);
$io->table($tableHeader, $tableRows, 'compact');
Expand Down Expand Up @@ -117,4 +133,24 @@ private function getServiceDetail($service)

return $serviceDetail;
}

private function getParameterList()
{
$parameters = array_filter(
$this->container->getParameterBag()->all(), function ($name) {
if (preg_match('/^container\./', $name)) {
return false;
}
if (preg_match('/^drupal\./', $name)) {
return false;
}
if (preg_match('/^console\./', $name)) {
return false;
}
return true;
}, ARRAY_FILTER_USE_KEY
);

return $parameters;
}
}
64 changes: 0 additions & 64 deletions src/Command/ContainerParametersCommand.php

This file was deleted.

0 comments on commit cda7f34

Please sign in to comment.