8000 Fix PHP 8.4 E_STRICT deprecation notices (2.x backport) by joec4i · Pull Request #1970 · Seldaek/monolog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

F 8000 ix PHP 8.4 E_STRICT deprecation notices (2.x backport) #1970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Monolog/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ protected function defaultErrorLevelMap(): array
E_USER_ERROR => LogLevel::ERROR,
E_USER_WARNING => LogLevel::WARNING,
E_USER_NOTICE => LogLevel::NOTICE,
E_STRICT => LogLevel::NOTICE,
2048 => LogLevel::NOTICE, // E_STRICT
E_RECOVERABLE_ERROR => LogLevel::ERROR,
E_DEPRECATED => LogLevel::NOTICE,
E_USER_DEPRECATED => LogLevel::NOTICE,
Expand Down Expand Up @@ -292,7 +292,7 @@ private static function codeToString($code): string
return 'E_USER_WARNING';
case E_USER_NOTICE:
return 'E_USER_NOTICE';
case E_STRICT:
case 2048:
return 'E_STRICT';
case E_RECOVERABLE_ERROR:
return 'E_RECOVERABLE_ERROR';
Expand Down
2 changes: 1 addition & 1 deletion tests/Monolog/ErrorHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function testCodeToString()
$this->assertEquals('E_USER_ERROR', $method->invokeArgs(null, [E_USER_ERROR]));
$this->assertEquals('E_USER_WARNING', $method->invokeArgs(null, [E_USER_WARNING]));
$this->assertEquals('E_USER_NOTICE', $method->invokeArgs(null, [E_USER_NOTICE]));
$this->assertEquals('E_STRICT', $method->invokeArgs(null, [E_STRICT]));
$this->assertEquals('E_STRICT', $method->invokeArgs(null, [2048]));
$this->assertEquals('E_RECOVERABLE_ERROR', $method->invokeArgs(null, [E_RECOVERABLE_ERROR]));
$this->assertEquals('E_DEPRECATED', $method->invokeArgs(null, [E_DEPRECATED]));
$this->assertEquals('E_USER_DEPRECATED', $method->invokeArgs(null, [E_USER_DEPRECATED]));
Expand Down
0