Skip to content

Commit 1c955a6

Browse files
authored
[11.x] Revert auto-discovering routes/console.php as this will cause 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.
1 parent e063fa8 commit 1c955a6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Illuminate/Foundation/Configuration/ApplicationBuilder.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,7 @@ public function withMiddleware(?callable $callback = null)
283283
public function withCommands(array $commands = [])
284284
{
285285
if (empty($commands)) {
286-
if (is_file($this->app->basePath('routes/console.php'))) {
287-
$commands = [$this->app->basePath('routes/console.php')];
288-
}
289-
290-
if (is_dir($this->app->path('Console/Commands'))) {
291-
$commands = [...$commands, $this->app->path('Console/Commands')];
292-
}
286+
$commands = [$this->app->path('Console/Commands')];
293287
}
294288

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

0 commit comments

Comments
 (0)