Skip to content

Commit ca73336

Browse files
authored
[console] Inject DrupalFinder to commands. (#335)
1 parent 957dda4 commit ca73336

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Application.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,12 @@ private function registerCommands()
461461
);
462462
}
463463

464+
if (method_exists($command, 'setDrupalFinder')) {
465+
$command->setDrupalFinder(
466+
$this->container->get('console.drupal_finder')
467+
);
468+
}
469+
464470
if (array_key_exists($command->getName(), $aliases)) {
465471
$commandAliases = $aliases[$command->getName()];
466472
if (!is_array($commandAliases)) {
@@ -501,6 +507,7 @@ private function registerGenerators()
501507
if (!$generator) {
502508
continue;
503509
}
510+
504511
if (method_exists($generator, 'setRenderer')) {
505512
$generator->setRenderer(
506513
$this->container->get('console.renderer')

0 commit comments

Comments
 (0)