1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

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.
This commit is contained in:
Bruce Weirdan 2020-12-06 19:40:55 +02:00 committed by Daniil Gentili
parent 54b705ec79
commit 7cc512c9dc
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -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) {