league/flysystem-local
Flysystem Local adapter sub-split for storing files on the local filesystem. Install via composer require league/flysystem-local. For issues and pull requests, use the main Flysystem repo; see the docs for configuration and usage.
Architecture fit: This package is a Flysystem adapter for local filesystem storage, designed to integrate seamlessly with Flysystem's abstraction layer. It's ideal for projects already using Flysystem or planning to adopt its unified storage interface. Best suited for single-server deployments where cloud storage isn't required, but provides a clear migration path to cloud backends (e.g., AWS S3) later.
Integration feasibility: High for Composer-based PHP projects (especially Laravel). Minimal setup required: install via Composer, configure root path, and wrap with Filesystem. Laravel-specific integration is simplified using league/flysystem-bundle or custom service providers. However, requires Flysystem core adoption if not already present.
Technical risk: Low for core functionality but moderate for security if misconfigured. Path traversal vulnerabilities exist if user input isn't properly sanitized (e.g., no realpath() or whitelisting). The sub-split nature means issues/PRs must be directed to the main Flysystem repo, which could cause confusion for new contributors. Low adoption metrics (228 stars, 0 dependents) for this sub-split but benefits from Flysystem's overall ecosystem maturity.
Key questions:
../ attacks)?Stack fit: Perfect for PHP stacks (especially Laravel) requiring local file operations. Works natively with Composer and integrates cleanly with Laravel via storage_path('app') for root paths. The abstraction layer aligns with modern PHP practices (dependency injection, service containers) and avoids vendor lock-in.
Migration path:
file_get_contents()/fopen() calls with Flysystem operations incrementally (start with non-critical paths)league/flysystem-bundle for automatic service registration or create a custom provider binding Filesystem to a config-driven root pathwrite(), read(), delete())Compatibility: Requires PHP 7.4+ (Flysystem v2) or 8.0+ (v3). Fully compatible with Laravel 8+ and Symfony. Works with any filesystem structure but requires path normalization awareness (e.g., / vs. \ handling).
Sequencing:
How can I help you explore Laravel packages today?