Skip to content

Commit

Permalink
Merge pull request #225 from jmolivas/container-debug-hack-remove
Browse files Browse the repository at this point in the history
Container debug hack remove
  • Loading branch information
jmolivas committed Oct 16, 2014
2 parents 8c1efa3 + e901865 commit b132d00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
}
],
"require": {
"php": ">=5.4.2",
"php": ">=5.4.5",
"symfony/console": "2.5.*",
"symfony/finder": "2.5.*",
"symfony/dependency-injection": "2.5.*",
"twig/twig": "~1.15",
"twig/twig": "1.15.*",
"composer/installers": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "4.1.*",
"drupal/drupal": "8.0.*@dev",
"drupal/drupal": "8.0.x-dev",
"drupal/coder": "dev-8.x-2.x"
},
"minimum-stability": "dev",
Expand Down
16 changes: 3 additions & 13 deletions src/Command/ContainerDebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,14 @@ protected function configure()

protected function execute(InputInterface $input, OutputInterface $output)
{
// skip services
// service declaration at core/core.services.yml file, arguments are not properly set, must be
// arguments: ['@controller_resolver', '@entity.manager', '@form_builder', NULL]
$skip[] = 'controller.entityform';
// scope: request declaration make it fails on container->get($id)
// find a better way to retrieve services filtering by tag or scope
$skip = array_merge($skip, ['finish_response_subscriber', 'redirect_response_subscriber']);

$services = $this->getServices();
$table = $this->getHelperSet()->get('table');
$table->setHeaders(['Service ID', 'Class name']);
$table->setlayout($table::LAYOUT_COMPACT);
foreach ($services as $serviceId) {
if ( false === array_search($serviceId, $skip) ) {
$service = $this->getContainer()->get($serviceId);
$class = get_class($service);
$table->addRow([$serviceId, $class]);
}
$service = $this->getContainer()->get($serviceId);
$class = get_class($service);
$table->addRow([$serviceId, $class]);
}
$table->render($output);
}
Expand Down

0 comments on commit b132d00

Please sign in to comment.