Skip to content

Commit

Permalink
[console] Fix You have requested a non-existent service 'cache.backen…
Browse files Browse the repository at this point in the history
…d.null'. #… (#3592)

* Fix You have requested a non-existent service 'cache.backend.null'. #3591

* Remove not required code.
  • Loading branch information
jmolivas authored Nov 15, 2017
1 parent fa76191 commit a082c99
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/Bootstrap/DrupalKernelTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,14 @@ protected function getContainerBuilder()
*/
public function discoverServiceProviders()
{
// Discover all Drupal service providers
// Discover Drupal service providers
parent::discoverServiceProviders();

// Discover Drupal Console service providers
$this->discoverDrupalConsoleServiceProviders();
}

public function discoverDrupalConsoleServiceProviders() {
$drupalFinder = new DrupalFinder();
$drupalFinder->locateRoot(getcwd());

Expand All @@ -82,7 +87,15 @@ protected function addDrupalConsoleModuleServices($root)
$servicesFiles[] = $servicesFile;
}
}
$this->addServiceFiles($servicesFiles);

$this->addDrupalServiceFiles($servicesFiles);
}

public function addDrupalServiceFiles($servicesFiles) {
$this->serviceYamls['site'] = array_merge(
$this->serviceYamls['site'],
$servicesFiles
);
}

protected function addDrupalConsoleThemeServices($root)
Expand Down

0 comments on commit a082c99

Please sign in to comment.