Skip to content

Commit b6f05f8

Browse files
Skip class which is not found by class loader at scan time (#4253)
* Skip class file does not exist at scan time * Skip class which is not found by class loader at scan time. Co-authored-by: 李铭昕 <[email protected]>
1 parent 0c4e810 commit b6f05f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Annotation/Scanner.php

+4
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@ protected function getChangedAspects(array $aspects, int $lastCacheModified): ar
343343
}
344344
foreach ($classes as $class) {
345345
$file = $this->classloader->getComposerClassLoader()->findFile($class);
346+
if ($file === false) {
347+
echo sprintf('Skip class %s, because it does not exist in composer class loader.', $class) . PHP_EOL;
348+
continue;
349+
}
346350
if ($lastCacheModified <= $this->filesystem->lastModified($file)) {
347351
$changed[] = $class;
348352
}

0 commit comments

Comments
 (0)