From 4456894d0cbfe776052c928abb6b02e8a866933a Mon Sep 17 00:00:00 2001 From: wjzijderveld Date: Mon, 30 Sep 2024 17:11:27 +0200 Subject: [PATCH] Also cover the change in a test --- src/Monolog/Handler.php | 3 +++ tests/Monolog/HandlerTest.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/Monolog/Handler.php b/src/Monolog/Handler.php index 94061beaf..615a62192 100644 --- a/src/Monolog/Handler.php +++ b/src/Monolog/Handler.php @@ -122,6 +122,9 @@ private function getMonologExtraData(array $context): array return $extraData; } + /** + * @param mixed[] $context + */ private function hasExceptionContext(array $context): bool { return isset($context[self::CONTEXT_EXCEPTION_KEY]) && $context[self::CONTEXT_EXCEPTION_KEY] instanceof \Throwable; diff --git a/tests/Monolog/HandlerTest.php b/tests/Monolog/HandlerTest.php index bc1d4dd67..d2668814f 100644 --- a/tests/Monolog/HandlerTest.php +++ b/tests/Monolog/HandlerTest.php @@ -269,6 +269,7 @@ public static function handleDataProvider(): iterable [ 'foo' => 'bar', 'bar' => 'baz', + 'exception' => 'just a message', ], [] ), @@ -280,6 +281,7 @@ public static function handleDataProvider(): iterable 'monolog.context' => [ 'foo' => 'bar', 'bar' => 'baz', + 'exception' => 'just a message', ], ], ];