illuminate/filesystem
Illuminate Filesystem is Laravel’s filesystem abstraction, providing a clean API for local and cloud storage. It supports multiple “disks” (local, S3, FTP, etc.), file operations, streaming, visibility, and configuration via the Flysystem adapter layer.
Architecture fit: Standalone component designed for Laravel ecosystem but usable outside it; requires illuminate/collections, contracts, macroable, and support packages. Ideal for Laravel projects where it integrates natively with config and DI, but introduces dependency overhead for non-Laravel apps.
Integration feasibility: High for Laravel projects (pre-installed), moderate for standalone use (Composer install + manual dependency management). Simple API with minimal boilerplate for basic file operations but requires handling Flysystem-specific configurations for cloud drivers.
Technical risk: Moderate. Low standalone adoption (0 dependents) suggests limited community validation outside Laravel. Tight coupling with other Illuminate packages could cause version conflicts in non-Laravel projects. The symfony/filesystem dependency introduces exception handling complexity (IOExceptionInterface vs. PHP core exceptions).
Key questions:
Stack fit: Optimized for Laravel but works in any PHP 8.3+ project. Integrates seamlessly with Flysystem-backed storage (S3, FTP, etc.) and Laravel’s Storage facade. Requires manual setup of disks/config for non-Laravel projects.
Migration path:
file_get_contents()/file_put_contents() with $fs->get()/$fs->put() for basic reads/writes.scandir()) with $fs->allFiles() or $fs->directories().atomicPut() for critical writes to avoid partial updates.storage_path()/base_path() for path resolution to avoid CLI/HTTP discrepancies.FilesystemManager).composer require illuminate/filesystem).How can I help you explore Laravel packages today?