Skip to content

Commit

Permalink
[11.x] Fixes ApplicationBuilder::withCommandRouting() usage.
Browse files Browse the repository at this point in the history
This also apply the changes from PR #50738 for `withCommandRouting()`
method.

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Mar 25, 2024
1 parent eb6fc3c commit a748ee9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ public function withCommands(array $commands = [])
protected function withCommandRouting(array $paths)
{
$this->app->afterResolving(ConsoleKernel::class, function ($kernel) use ($paths) {
$kernel->setCommandRoutePaths($paths);
$this->app->booted(function () {
$kernel->addCommandRoutePaths($paths);

Check failure on line 278 in src/Illuminate/Foundation/Configuration/ApplicationBuilder.php

View workflow job for this annotation

GitHub Actions / Source Code

Undefined variable: $kernel

Check failure on line 278 in src/Illuminate/Foundation/Configuration/ApplicationBuilder.php

View workflow job for this annotation

GitHub Actions / Source Code

Undefined variable: $paths
});
});
}

Expand Down

0 comments on commit a748ee9

Please sign in to comment.