From 1632a2d35dbc9ba22efa1cddc6969d3e3f4bf291 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Mon, 6 May 2024 11:11:51 +0200 Subject: [PATCH] PHPStan Pro - do not monitor file changes when analysis is in progress --- src/Command/FixerApplication.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Command/FixerApplication.php b/src/Command/FixerApplication.php index 7cc4d1dea6..17033d7533 100644 --- a/src/Command/FixerApplication.php +++ b/src/Command/FixerApplication.php @@ -412,6 +412,10 @@ private function monitorFileChanges(LoopInterface $loop, callable $hasChangesCal $loop->addTimer(1.0, $callback); return; } + if ($this->processInProgress !== null) { + $loop->addTimer(1.0, $callback); + return; + } $changes = $this->fileMonitor->getChanges(); if ($changes->hasAnyChanges()) {