From 6fdeea463cc61a112c0fa969ceec6f576d181b07 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 22 Jul 2022 15:07:44 +0200 Subject: [PATCH] Fix build --- phpstan.neon.dist | 3 +++ tests/Monolog/Formatter/NormalizerFormatterTest.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 4a368cd2b..d368b288e 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -8,6 +8,9 @@ parameters: - src/ # - tests/ + excludePaths: + - 'src/Monolog/Handler/PHPConsoleHandler.php' + ignoreErrors: - '#zend_monitor_|ZEND_MONITOR_#' - '#MongoDB\\(Client|Collection)#' diff --git a/tests/Monolog/Formatter/NormalizerFormatterTest.php b/tests/Monolog/Formatter/NormalizerFormatterTest.php index 00cc1fb90..181065eda 100644 --- a/tests/Monolog/Formatter/NormalizerFormatterTest.php +++ b/tests/Monolog/Formatter/NormalizerFormatterTest.php @@ -369,8 +369,9 @@ public function testExceptionTraceWithArgs() $record = ['context' => ['exception' => $e]]; $result = $formatter->format($record); + $offset = PHP_VERSION_ID >= 80200 ? 12 : 10; $this->assertSame( - __FILE__.':'.(__LINE__-9), + __FILE__.':'.(__LINE__ - $offset), $result['context']['exception']['trace'][0] ); }