phpdocumentor/flyfinder
FlyFinder is a utility for Flysystem that finds files by criteria such as hidden status, extension, or path, with wildcard path support. It returns files only, not directories, and integrates easily via Composer.
Architecture fit: FlyFinder is a specification-based file-discovery utility layered on top of Flysystem. It is not a terminal/UI or interactive CLI library; earlier notes describing it as a Symfony Console fuzzy-picker are inaccurate and should be disregarded. In a Laravel context it fits backend file-enumeration logic: batch jobs, asset scanning, build tooling, content audits, and Artisan commands that walk a filesystem. It returns files only (never directories) and exposes composed specifications (IsHidden, HasExtension, InPath, Glob) that combine via andSpecification/orSpecification/notSpecification. It does not plug into Flysystem v3 as a plugin — v3 removed plugin support — so usage is an explicit new Finder($filesystem) wrapper.
Integration feasibility: High via Composer and a small, stable API. Version 2.0.0 is the Flysystem v3 port; 2.0.1 fixes a bug where Glob wrote into Flysystem 3 attributes. Since Laravel 9+ ships Flysystem 3 under the Storage facade, the supported baseline aligns with modern Laravel. Integration requires obtaining the underlying League\Flysystem\Filesystem from a Laravel disk (Laravel's Storage::disk() returns a FilesystemAdapter, not the raw Flysystem), then handing it to Finder.
Technical risk: Moderate. Positives: MIT license, public source, an active 2.0.x line with a correctness patch, Flysystem 3 explicitly supported, and a very small surface to reason about. Negatives: ~30 stars, zero listed dependents, a tiny contributor base, and ownership nested inside the phpDocumentor org — the library exists primarily to serve phpDocumentor's own tooling, so maintenance is best-effort. There is no documented security disclosure process, and the 2.0.1 fix implies 2.0.0 could silently mutate attributes during Glob — teams on 2.0.0 should treat that as a data-integrity item.
Key questions:
Glob attribute handling fully corrected across all adapters in 2.0.1, and are there regression tests covering it?Stack fit: Good for filesystem-discovery features inside Laravel — queued jobs that enumerate files, reporting/export pipelines, media or asset scanners, and dev-only Artisan commands. Not a fit for web routes, Blade, or any interactive terminal UI. It pairs naturally with Laravel's Storage layer because both sit on Flysystem, but they are not the same object; you must bridge from the facade to the raw Filesystem instance before constructing Finder.
Migration path:
composer require phpdocumentor/flyfinder:^2.0.1 — pin at the patch level to guarantee the Glob attribute fix.Finder so the library can be swapped without touching call sites.listContents loops or hand-rolled glob filters with composed specifications.Compatibility: Requires explicit verification. Flysystem 3 compatibility is positively evidenced by the 2.0.1 patch. Confirm the PHP floor from the public composer.json and ensure no transitive constraint conflicts with the project's Laravel/Symfony stack. Projects still on Flysystem 1/2 must use the legacy 1.x line — do not attempt to mix 2.0.x with older Flysystem.
Sequencing:
composer.json to confirm Flysystem and PHP constraints against the target Laravel version.Glob and specification composition against the actual adapters in use (local first, then any remote disk).Maintenance: Low day-to-day, but not zero. The public repo allows pre-merge review of upgrades, and the 2.0.1 patch shows maintainers respond to correctness issues. Because the project is small and org-owned rather than vendor-supported, assume a fork-and-patch contingency for any critical-path usage. Track the Flysystem major version on each Laravel upgrade — that is the most likely break point.
Support: Community-only via GitHub issues. No commercial support, no SLA, no documented security response process. A first-time contributor landed the 2.0.1 fix, which is a mild health signal but not a support guarantee. Assign a named internal owner.
Scaling: The primary scaling concern is traversal throughput, not concurrency. FlyFinder enumerates and filters, so cost scales with tree size, depth, and adapter latency. Local disks are fast; S3 and network-backed disks pay per-listing latency and can produce long runtimes or timeouts on large trees. Benchmark before relying on it in any synchronous request path; prefer queue workers for large scans.
Failure modes:
Glob/spec handling across adapters — exactly the class of defect fixed in 2.0.1.Mitigation: pin ^2.0.1, wrap Finder behind an internal abstraction, add smoke tests covering specification composition and Glob output on each adapter you actually use, and set an internal review cadence tied to Laravel upgrades.
Ramp-up: Very low. The API is a handful of specification classes plus Finder, and developers already comfortable with Flysystem will be productive within half a day. TPM effort concentrates on compatibility verification and performance benchmarking rather than on learning the library.
How can I help you explore Laravel packages today?