StubFileScanner
final class StubFileScanner (View source)
Recursively finds files under a directory using scandir().
Why not RecursiveDirectoryIterator? Over the Docker Desktop (Windows) bind mount — gRPC-FUSE/virtiofs — the SPL directory iterators (RecursiveDirectoryIterator, DirectoryIterator) return a TRUNCATED listing: the head of each directory stream is silently dropped, so whole extension directories (Core, curl, dom, FFI, ...) vanish from the scan. The affected files are never read, never parsed, and never make it into the generated Stubs*.json / PhpStormStubsMap.php / meta references — with no error, because the files are never even discovered. scandir() reads the whole directory in a single call and is not affected, so it is the single source of truth for tree traversal in this codebase.
Methods
Recursively collect file paths under $root.
Details
static array
collect(string $root, callable $accept, callable $descend)
Recursively collect file paths under $root.