nette/finder
Nette Finder is a lightweight PHP utility for finding files and directories with an expressive, fluent API. Filter by name, size, date, and type, search recursively, and iterate results easily—ideal for CLI tools, build scripts, and apps.
nette/finder package provides a fluent, intuitive API for file/directory traversal, filtering, and manipulation—ideal for Laravel applications requiring file system operations (e.g., asset processing, cache management, or dynamic file generation). It abstracts PHP’s native RecursiveIterator/FilesystemIterator, offering a cleaner, more expressive syntax (e.g., Finder::find()->files()->in('path')->name('*.php')).Storage, File, Filesystem), nette/finder excels in complex queries (e.g., filtering by modification time, size, or nested patterns) without reinventing wheel. It could complement Laravel’s ecosystem (e.g., for custom file-based caching or media libraries).spatie/laravel-finder (a Laravel wrapper) may be safer long-term.laravel/framework, symfony/filesystem).File facade (Storage::files()), but nette/finder’s method chaining and filter options (e.g., ->date('>1 week ago')) offer superior flexibility for advanced use cases.kdyby/finder) or replace with Laravel’s Filesystem.nette/finder may require regression tests if the package is forked or replaced later.nette/finder?
Storage)?Filesystem or File suffice?spatie/laravel-finder) within 12–18 months.nette/finder vs. Laravel’s Filesystem to ensure no bottlenecks.Finder as a singleton) and facades (e.g., Finder::find()).php artisan find:process-assets).Finder events.Mockery or PHPUnit for unit/integration tests.Initial Adoption (Low Risk)
composer require nette/finder
use Nette\Utils\Finder;
$files = Finder::find()->files()->in(storage_path('app/uploads'));
Long-Term Replacement (High Priority)
Storage::files() + custom logic.spatie/laravel-finder (Laravel wrapper).nette/finder usages in codebase.Filesystem or the alternative package.Filesystem.nette/finder usages.Finder calls in try-catch blocks to handle potential BC breaks gracefully.->limit() to paginate results.RecursiveIterator is single-threaded). Use Laravel’s queues for background processing.| Risk | Impact | Mitigation |
|---|---|---|
| Package abandonment | Security vulnerabilities | Fork + maintain; plan 12-month migration. |
| PHP BC breaks | Code failures in PHP 9.0+ | Test against nightly PHP builds. |
| File system corruption | Silent failures in recursive ops | Validate paths; use ->ignoreDotFiles(). |
| Dependency conflicts | Composer install failures | Isolate in a custom package. |
Finder::find()->files()).Finder in a Console/Command).nette/finder.Finder instances.Finder usages in PRs.How can I help you explore Laravel packages today?