Skip to content

Commit

Permalink
[console] Remove console.service_definitions parameter definition. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas authored Dec 5, 2017
1 parent 71d1652 commit 1aa0a50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 8 additions & 4 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ public function validateCommands()
return;
}

if (!$this->container->hasParameter('console.service_definitions')) {
$serviceDefinitions = $this->container->getDefinitions();

if (!$serviceDefinitions) {
return;
}

$serviceDefinitions = $this->container
->getParameter('console.service_definitions');

if (!$serviceDefinitions) {
if (!$this->container->has('console.annotation_command_reader')) {
return;
}

Expand All @@ -90,6 +90,10 @@ public function validateCommands()
$annotationCommandReader = $this->container
->get('console.annotation_command_reader');

if (!$this->container->has('console.annotation_validator')) {
return;
}

/**
* @var AnnotationValidator $annotationValidator
*/
Expand Down
6 changes: 0 additions & 6 deletions src/Bootstrap/DrupalCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ public function process(ContainerBuilder $container)
->getDefinition('console.translator_manager')
->setClass(TranslatorManager::class);

// Set console.service_definitions service
$container->setParameter(
'console.service_definitions',
$container->getDefinitions()
);

// Set console.invalid_commands service
$container->set(
'console.invalid_commands',
Expand Down

0 comments on commit 1aa0a50

Please sign in to comment.