[GH-ISSUE #1366] JsonFormatter is not making usage of JsonSerializable #573

Closed
opened 2026-03-04 02:16:04 +03:00 by kerem · 0 comments
Owner

Originally created by @carusogabriel on GitHub (Aug 28, 2019).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1366

In #1309, the src/Monolog/Formatter/NormalizerFormatter.php class received an improvement in the case that the exception class implements the JsonSerializable interface, it would use the JsonSerializable::jsonSerialize method.

During some tests with Monolog 2 Beta 2, it looks like the src/Monolog/Formatter/JsonFormatter.php class is not making usage of that improvement in the normalizeException method.

Should we port the changes to JsonFormatter as well, or is something else that we need to fix?

Originally created by @carusogabriel on GitHub (Aug 28, 2019). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1366 In #1309, the `src/Monolog/Formatter/NormalizerFormatter.php` class received an improvement in the case that the exception class implements the `JsonSerializable` interface, it would use the `JsonSerializable::jsonSerialize` method. During some tests with Monolog 2 Beta 2, it looks like the `src/Monolog/Formatter/JsonFormatter.php` class is not making usage of that improvement in the `normalizeException` method. Should we port the changes to `JsonFormatter` as well, or is something else that we need to fix?
kerem closed this issue 2026-03-04 02:16:05 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#573
No description provided.