Skip to content

Commit 0f177c3

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

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ BREAKING
2323
Behavior Changes
2424
================
2525

26+
- The static ``Boot::initializeConsole()`` method no longer handles the display of the console header. This is now handled within ``Console::run()``. If you have overridden ``Boot::initializeConsole()`` in your project, you should remove any code related to displaying the console header, as it will no longer be called or used.
2627
- **Commands:** The ``filter:check`` command now requires the HTTP method argument to be uppercase (e.g., ``spark filter:check GET /`` instead of ``spark filter:check get /``).
2728
- **Database:** The Postgre driver's ``$db->error()['code']`` previously always returned ``''``. It now returns the 5-character SQLSTATE string for query and transaction failures (e.g., ``'42P01'``), or ``'08006'`` for connection-level failures. Code that relied on ``$db->error()['code'] === ''`` will need updating.
2829
- **Filters:** HTTP method matching for method-based filters is now case-sensitive. The keys in ``Config\Filters::$methods`` must exactly match the request method
@@ -233,7 +234,6 @@ Changes
233234
Deprecations
234235
************
235236

236-
- The ``Boot::initializeConsole()`` method is now deprecated and will be removed in a future release.
237237
- **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.
238238
- **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.
239239
- **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)