finds.dev

sebastianbergmann/php-file-iterator

FilterIterator implementation that filters files based on a list of suffixes, prefixes, and other exclusion criteria.

View on GitHub

★ 7,492PHPBSD-3-Clauseupdated Jul 2026

// the take

A FilterIterator for PHP that walks directory trees and returns only files matching specified suffixes, prefixes, or path patterns. It ships as a PHPUnit dependency — that's where its 7k stars come from, not organic adoption. You've almost certainly already been using it without knowing it.

Actively maintained by Sebastian Bergmann, updated as recently as two days ago. The tooling setup is unusually thorough for a small utility: PHPStan at strict level, type-coverage enforcement via tomasvotruba/type-coverage, and a proper CI pipeline. The Facade class gives you a single static entry point that handles the common cases without having to wire up the Iterator and Factory yourself.

The README is essentially empty — installation instructions and nothing else. If you haven't already read the PHPUnit internals, you'll need to dig into the source to understand what filter combinations are actually supported. No documentation on how prefix/suffix/exclude criteria interact when combined, which matters if you're trying to use this outside the PHPUnit context. The star count is entirely borrowed prestige; actual standalone users are probably in the dozens.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
7,492
Forks
47
Language
PHP
License
BSD-3-Clause
Last commit
8 Jul 2026

// nearby

If php-file-iterator isn't quite it.

All repos →