Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

File Filter Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Accelerates development by avoiding reinventing file-filtering logic (e.g., for test suites, CI/CD pipelines, or asset processing). Reduces maintenance overhead compared to custom solutions.
  • Roadmap Alignment: Enables faster iteration for projects requiring dynamic file selection (e.g., PHPUnit integration, custom build tools, or modular deployments).
  • Use Cases:
    • Testing: Filter test files by name, extension, or pattern (e.g., *Test.php).
    • CI/CD: Exclude dev files (e.g., node_modules/) from builds.
    • Asset Processing: Select files for minification, localization, or versioning.
    • Legacy Migration: Replace ad-hoc scripts with a standardized, tested library.

When to Consider This Package

  • Adopt if:

    • You need reliable, battle-tested file filtering (extracted from PHPUnit).
    • Your use case aligns with glob patterns, regex, or callback-based filtering.
    • You’re working in a PHP/Laravel ecosystem and want to avoid reinventing wheel.
    • Your team prioritizes low-maintenance dependencies with clear documentation.
  • Look elsewhere if:

    • You require advanced file system operations (e.g., recursive symlink handling, permissions).
    • Your project needs cross-language support (e.g., Python/Node.js).
    • You’re building a high-performance tool where PHP’s overhead is prohibitive.
    • The package’s BSD-3-Clause license conflicts with your project’s licensing (unlikely, but verify).

How to Pitch It (Stakeholders)

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."*

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai