Skip to content

Commit

Permalink
[11.x] Fixes ApplicationBuilder::withCommandRouting() usage (#50742)
Browse files Browse the repository at this point in the history
* [11.x] Fixes `ApplicationBuilder::withCommandRouting()` usage.

This also apply the changes from PR #50738 for `withCommandRouting()`
method.

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* Apply fixes from StyleCI

* wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* wip

* wip

---------

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
  • Loading branch information
crynobone and StyleCIBot committed Mar 25, 2024
1 parent a32ba83 commit 598f26b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ 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(fn () => $kernel->addCommandRoutePaths($paths));
});
}

Expand Down

0 comments on commit 598f26b

Please sign in to comment.