Skip to content

Commit

Permalink
Fix ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Feb 4, 2023
1 parent 0f01420 commit 6459aeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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<Fiber, int>\|null\.#'
2 changes: 0 additions & 2 deletions src/Monolog/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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--;
Expand Down

0 comments on commit 6459aeb

Please sign in to comment.