From ca73336768a39ba82e5756be432b31a72a1cba5c Mon Sep 17 00:00:00 2001 From: Jesus Manuel Olivas Date: Wed, 21 Mar 2018 00:19:31 -0700 Subject: [PATCH] [console] Inject DrupalFinder to commands. (#335) --- src/Application.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Application.php b/src/Application.php index 86d08a1..9ee2003 100644 --- a/src/Application.php +++ b/src/Application.php @@ -461,6 +461,12 @@ private function registerCommands() ); } + if (method_exists($command, 'setDrupalFinder')) { + $command->setDrupalFinder( + $this->container->get('console.drupal_finder') + ); + } + if (array_key_exists($command->getName(), $aliases)) { $commandAliases = $aliases[$command->getName()]; if (!is_array($commandAliases)) { @@ -501,6 +507,7 @@ private function registerGenerators() if (!$generator) { continue; } + if (method_exists($generator, 'setRenderer')) { $generator->setRenderer( $this->container->get('console.renderer')