Skip to content

Commit 163a20b

Browse files
committed
deprecate Boot::initializeConsole()
1 parent d2518f6 commit 163a20b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

system/Boot.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,8 @@ public static function bootSpark(Paths $paths): int
161161
static::autoloadHelpers();
162162

163163
static::initializeCodeIgniter();
164-
$console = static::initializeConsole();
165164

166-
return static::runCommand($console);
165+
return static::runCommand(new Console());
167166
}
168167

169168
/**
@@ -422,8 +421,13 @@ protected static function saveConfigCache(FactoriesCache $factoriesCache): void
422421
$factoriesCache->save('config');
423422
}
424423

424+
/**
425+
* @deprecated 4.8.0 No longer used.
426+
*/
425427
protected static function initializeConsole(): Console
426428
{
429+
@trigger_error(sprintf('The static %s() method is deprecated and no longer used.', __METHOD__), E_USER_DEPRECATED);
430+
427431
$console = new Console();
428432

429433
// Show basic information before we do anything else.
@@ -439,8 +443,6 @@ protected static function initializeConsole(): Console
439443

440444
protected static function runCommand(Console $console): int
441445
{
442-
$exit = $console->run();
443-
444-
return is_int($exit) ? $exit : EXIT_SUCCESS;
446+
return $console->run() ?? EXIT_SUCCESS;
445447
}
446448
}

0 commit comments

Comments
 (0)