From 8ead1797727968deafc2d240ffca3684af2c26da Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Fri, 20 Feb 2026 15:17:41 +0800 Subject: [PATCH] refactor: remove `Exceptions::isImplicitNullableDeprecationError` --- system/Debug/Exceptions.php | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/system/Debug/Exceptions.php b/system/Debug/Exceptions.php index 6bf914c785bb..3c8b1f006ea7 100644 --- a/system/Debug/Exceptions.php +++ b/system/Debug/Exceptions.php @@ -201,10 +201,6 @@ public function errorHandler(int $severity, string $message, ?string $file = nul return true; } - if ($this->isImplicitNullableDeprecationError($message, $file, $line)) { - return true; - } - if (! $this->config->logDeprecations || (bool) env('CODEIGNITER_SCREAM_DEPRECATIONS')) { throw new ErrorException($message, 0, $severity, $file, $line); } @@ -245,38 +241,6 @@ private function isSessionSidDeprecationError(string $message, ?string $file = n return false; } - /** - * Workaround to implicit nullable deprecation errors in PHP 8.4. - * - * "Implicitly marking parameter $xxx as nullable is deprecated, - * the explicit nullable type must be used instead" - * - * @TODO remove this before v4.6.0 release - */ - private function isImplicitNullableDeprecationError(string $message, ?string $file = null, ?int $line = null): bool - { - if ( - PHP_VERSION_ID >= 80400 - && str_contains($message, 'the explicit nullable type must be used instead') - // Only Kint and Faker, which cause this error, are logged. - && (str_starts_with($message, 'Kint\\') || str_starts_with($message, 'Faker\\')) - ) { - log_message( - LogLevel::WARNING, - '[DEPRECATED] {message} in {errFile} on line {errLine}.', - [ - 'message' => $message, - 'errFile' => clean_path($file ?? ''), - 'errLine' => $line ?? 0, - ], - ); - - return true; - } - - return false; - } - /** * Checks to see if any errors have happened during shutdown that * need to be caught and handle them.