sebastian/file-filter
Filter and whitelist/blacklist files and directories in PHP projects. Extracted from phpunit/phpunit, this lightweight library helps build file lists while honoring include/exclude rules—useful for test runners, coverage tools, and CLI utilities.
*Test.php).node_modules/) from builds.Adopt if:
Look elsewhere if:
For Executives:
"This lightweight PHP library (sebastian/file-filter) lets us standardize file selection across testing, builds, and deployments—saving dev time and reducing bugs. Used by PHPUnit, it’s stable and maintained, so we avoid reinventing the wheel. Minimal cost (BSD license), zero lock-in, and immediate ROI for automation workflows."
For Engineers:
*"Need to filter files dynamically? This package handles glob patterns, regex, and callbacks—no more fragile find/grep hacks. Works seamlessly with Laravel’s filesystem or standalone. Example:
$filter = new \SebastianBergmann\FileFilter\Filter();
$files = $filter->filter(['src/**/*.php'], ['tests/**']);
Zero dependencies, actively maintained, and extracted from PHPUnit’s core. Let’s use it for [X use case] to cut [Y] hours of dev work."*
How can I help you explore Laravel packages today?