Skip to content

Commit 5b06f27

Browse files
committed
revert deprecation on Boot::initializeConsole()
1 parent 51f329d commit 5b06f27

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

system/Boot.php

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public static function bootSpark(Paths $paths): int
162162

163163
static::initializeCodeIgniter();
164164

165-
return static::runCommand(new Console());
165+
return static::runCommand(static::initializeConsole());
166166
}
167167

168168
/**
@@ -421,24 +421,9 @@ protected static function saveConfigCache(FactoriesCache $factoriesCache): void
421421
$factoriesCache->save('config');
422422
}
423423

424-
/**
425-
* @deprecated 4.8.0 No longer used.
426-
*/
427424
protected static function initializeConsole(): Console
428425
{
429-
@trigger_error(sprintf('The static %s() method is deprecated and no longer used.', __METHOD__), E_USER_DEPRECATED);
430-
431-
$console = new Console();
432-
433-
// Show basic information before we do anything else.
434-
if (is_int($suppress = array_search('--no-header', $_SERVER['argv'], true))) {
435-
unset($_SERVER['argv'][$suppress]);
436-
$suppress = true;
437-
}
438-
439-
$console->showHeader($suppress);
440-
441-
return $console;
426+
return new Console();
442427
}
443428

444429
protected static function runCommand(Console $console): int

user_guide_src/source/changelogs/v4.8.0.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ Changes
233233
Deprecations
234234
************
235235

236-
- The ``Boot::initializeConsole()`` method is now deprecated and will be removed in a future release.
237236
- **CLI:** The ``CLI::parseCommandLine()`` method is now deprecated and will be removed in a future release. The ``CLI`` class now uses the new ``CommandLineParser`` class to handle command-line argument parsing.
238237
- **CLI:** Returning a non-integer exit code from a command is now deprecated and will trigger a deprecation notice. Command methods should return an integer exit code (e.g., ``0`` for success, non-zero for errors) to ensure proper behavior across all platforms.
239238
- **HTTP:** The ``CLIRequest::parseCommand()`` method is now deprecated and will be removed in a future release. The ``CLIRequest`` class now uses the new ``CommandLineParser`` class to handle command-line argument parsing.

0 commit comments

Comments
 (0)