Skip to content

Commit

Permalink
[11.x] Revert auto-discovering routes/console.php as this will caus…
Browse files Browse the repository at this point in the history
…e breaking change with the default `withRouting($console)` (#52939)

* Revert "Fix for not automatically registering commands in App\Console\Commands (#52903)"

This reverts commit d76b2f1.

* Revert "Auto-Register Commands in `routes/console.php` (#52867)"

This reverts commit e216708.
  • Loading branch information
crynobone authored Sep 26, 2024
1 parent e063fa8 commit 1c955a6
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,7 @@ public function withMiddleware(?callable $callback = null)
public function withCommands(array $commands = [])
{
if (empty($commands)) {
if (is_file($this->app->basePath('routes/console.php'))) {
$commands = [$this->app->basePath('routes/console.php')];
}

if (is_dir($this->app->path('Console/Commands'))) {
$commands = [...$commands, $this->app->path('Console/Commands')];
}
$commands = [$this->app->path('Console/Commands')];
}

$this->app->afterResolving(ConsoleKernel::class, function ($kernel) use ($commands) {
Expand Down

0 comments on commit 1c955a6

Please sign in to comment.