Skip to content

Commit

Permalink
fix: only Faker/Kint errors are skipped
Browse files Browse the repository at this point in the history
This is a workaround for the dependent packages that are not compatible with PHP 8.4.
So we should not skip all implicit nullable deprecations.
  • Loading branch information
kenjis committed Sep 5, 2024
1 parent ba1702f commit 2eeb971
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions system/Debug/Exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,16 @@ private function isSessionSidDeprecationError(string $message, ?string $file = n
*
* "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,
Expand Down

0 comments on commit 2eeb971

Please sign in to comment.