diff --git a/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php b/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php index 5844cedb9..bce31106c 100644 --- a/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php @@ -684,18 +684,12 @@ class ProjectAnalyzer true ); - if ($this->project_cache_provider && $this->parser_cache_provider) { - $removed_parser_files = $this->parser_cache_provider->deleteOldParserCaches( - $is_diff ? $this->project_cache_provider->getLastRun(PSALM_VERSION) : $start_checks - ); + if ($this->project_cache_provider && $this->parser_cache_provider && !$is_diff) { + $removed_parser_files = $this->parser_cache_provider->deleteOldParserCaches($start_checks); if ($removed_parser_files) { $this->progress->debug('Removed ' . $removed_parser_files . ' old parser caches' . "\n"); } - - if ($is_diff) { - $this->parser_cache_provider->touchParserCaches($this->getAllFiles($this->config), $start_checks); - } } } diff --git a/src/Psalm/IssueBuffer.php b/src/Psalm/IssueBuffer.php index 9d3837e32..b4857dfcc 100644 --- a/src/Psalm/IssueBuffer.php +++ b/src/Psalm/IssueBuffer.php @@ -746,10 +746,6 @@ class IssueBuffer if ($project_analyzer->project_cache_provider) { $project_analyzer->project_cache_provider->processSuccessfulRun($start_time, PSALM_VERSION); } - - if ($codebase->statements_provider->parser_cache_provider) { - $codebase->statements_provider->parser_cache_provider->processSuccessfulRun(); - } } if ($error_count