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

Tag release RC-6. #2826

Merged
merged 1 commit into from
Oct 17, 2016
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
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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.