From 7cc512c9dc9fd84eda86b0a97dfcc45623254efd Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Sun, 6 Dec 2020 19:40:55 +0200 Subject: [PATCH] Adjust check for file modification time (#4789) This solves the issue where Psalm didn't notice the files created in the same second as the last run was started. --- src/Psalm/Internal/Analyzer/ProjectAnalyzer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php b/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php index b70cce6ba..46d8ef1ca 100644 --- a/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php @@ -1076,7 +1076,7 @@ class ProjectAnalyzer foreach ($file_paths as $file_path) { if ($config->isInProjectDirs($file_path)) { - if ($this->file_provider->getModifiedTime($file_path) > $last_run + if ($this->file_provider->getModifiedTime($file_path) >= $last_run && $this->parser_cache_provider->loadExistingFileContentsFromCache($file_path) !== $this->file_provider->getContents($file_path) ) { @@ -1149,7 +1149,7 @@ class ProjectAnalyzer public function checkPaths(array $paths_to_check): void { $this->visitAutoloadFiles(); - + $this->codebase->scanner->addFilesToShallowScan($this->extra_files); foreach ($paths_to_check as $path) {