diff --git a/packages/Caching/FileSystem/DependencyResolver.php b/packages/Caching/FileSystem/DependencyResolver.php index 1dfc4669006..8f1c690142f 100644 --- a/packages/Caching/FileSystem/DependencyResolver.php +++ b/packages/Caching/FileSystem/DependencyResolver.php @@ -45,6 +45,7 @@ public function resolveDependencies(Node $node, MutatingScope $mutatingScope): a continue; } + // only work with files that we've analysed if (! in_array($dependencyFile, $analysedFileAbsolutesPaths, true)) { continue; } diff --git a/src/ValueObjectFactory/ProcessResultFactory.php b/src/ValueObjectFactory/ProcessResultFactory.php index 6b38f82a24d..0311cb689b8 100644 --- a/src/ValueObjectFactory/ProcessResultFactory.php +++ b/src/ValueObjectFactory/ProcessResultFactory.php @@ -26,11 +26,12 @@ public function create(array $files): ProcessResult $errors = []; foreach ($files as $file) { + $errors = array_merge($errors, $file->getErrors()); + if ($file->getFileDiff() === null) { continue; } - $errors = array_merge($errors, $file->getErrors()); $fileDiffs[] = $file->getFileDiff(); }