From 6459aeb4a7adf2c10ab7210743f42af872f27d0b Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 4 Feb 2023 15:53:31 +0100 Subject: [PATCH] Fix ignores --- phpstan.neon.dist | 4 ++++ src/Monolog/Logger.php | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index eb126d4ae..81d47e3e7 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -44,3 +44,7 @@ parameters: # legacy GelfPHP 1.x failures - '# Gelf\\Message::set(Facility|Line|File)\(#' + + # php 8.1 Fiber failures + - '#unknown class Fiber#' + - '#Offset mixed does not exist on WeakMap\|null\.#' diff --git a/src/Monolog/Logger.php b/src/Monolog/Logger.php index f9ec27e87..775d7cf1f 100644 --- a/src/Monolog/Logger.php +++ b/src/Monolog/Logger.php @@ -344,7 +344,6 @@ public function addRecord(int $level, string $message, array $context = [], Date } if ($this->detectCycles) { - // @phpstan-ignore-next-line if (\PHP_VERSION_ID >= 80100 && $fiber = \Fiber::getCurrent()) { $this->fiberLogDepth[$fiber] = $this->fiberLogDepth[$fiber] ?? 0; $logDepth = ++$this->fiberLogDepth[$fiber]; @@ -409,7 +408,6 @@ public function addRecord(int $level, string $message, array $context = [], Date } finally { if ($this->detectCycles) { if (isset($fiber)) { - // @phpstan-ignore-next-line $this->fiberLogDepth[$fiber]--; } else { $this->logDepth--;