diff --git a/src/Reflection/BetterReflection/SourceLocator/ComposerJsonAndInstalledJsonSourceLocatorMaker.php b/src/Reflection/BetterReflection/SourceLocator/ComposerJsonAndInstalledJsonSourceLocatorMaker.php index 93fcff29e5..0f794e6ec3 100644 --- a/src/Reflection/BetterReflection/SourceLocator/ComposerJsonAndInstalledJsonSourceLocatorMaker.php +++ b/src/Reflection/BetterReflection/SourceLocator/ComposerJsonAndInstalledJsonSourceLocatorMaker.php @@ -109,10 +109,16 @@ public function create(string $projectInstallationPath): ?SourceLocator ); foreach ($classMapDirectories as $classMapDirectory) { + if (!is_dir($classMapDirectory)) { + continue; + } $locators[] = $this->optimizedDirectorySourceLocatorRepository->getOrCreate($classMapDirectory); } foreach (array_merge($classMapFiles, $filePaths) as $file) { + if (!is_file($file)) { + continue; + } $locators[] = $this->optimizedSingleFileSourceLocatorRepository->getOrCreate($file); }