league/flysystem-memory
Flysystem in-memory storage adapter (sub-split). Provides an in-memory filesystem for fast tests, temporary storage, and sandboxed usage. Install via composer require league/flysystem-memory; docs at flysystem.thephpleague.com.
Architecture fit: Ideal for testing ephemeral data handling or temporary caching in single-process environments. Unsuitable for persistent production storage due to volatility. Best for scenarios requiring zero disk I/O overhead (e.g., unit tests, isolated microservice components).
Integration feasibility: High for Flysystem-based systems; trivial Composer installation and drop-in adapter configuration. Requires existing Flysystem 3.x usage with no complex wiring beyond standard initialization.
Technical risk: Moderate. Last release (2019) indicates minimal active maintenance; potential compatibility gaps with newer Flysystem versions. In-memory volatility introduces data loss risks, and zero dependents suggest limited real-world validation.
Key questions: Is active maintenance handled via the main Flysystem repository? How does it handle concurrent access across PHP processes? What is the memory footprint for high-volume file operations? Are there known compatibility issues with Flysystem 3.2+?
Stack fit: Optimal for test suites (mocking filesystem operations) or short-lived processes (CLI scripts, CI/CD tasks). Not viable for production persistence or multi-process scaling due to process-isolated memory.
Migration path: For existing Flysystem users, replace current adapter with new MemoryAdapter(). Data loss is inherent—only suitable for throwaway data. Requires no schema changes but demands strict scoping (e.g., "unit tests only").
Compatibility: Requires PHP 8.0.2+ and Flysystem 3.x. Legacy Flysystem 1/2 users must migrate first. Verify version alignment before adoption.
Sequencing: 1) Implement in unit tests to replace disk-based mocks. 2) Validate in staging for non-critical caching use cases. 3) Avoid production deployment unless explicitly for temporary, non-persistent workloads.
Maintenance: Low ongoing effort if stable, but lack of recent updates increases risk of unaddressed bugs. Team must self-maintain for issues (e.g., PHP 8.1+ compatibility).
Support: Minimal community support due to zero dependents. Reliance on internal expertise; no SLA or vendor support. Documentation exists but is limited to Flysystem’s main docs.
Scaling: Severely constrained by RAM limits. Unsuitable for large files or high-throughput workloads. Each PHP process has isolated memory—horizontal scaling breaks shared state.
Failure modes: Complete data loss on process termination or crash. Risk of OOM errors during large file operations. No recovery mechanisms for accidental deletion.
Ramp-up: Minimal for Flysystem users (1–2 hours to integrate in testing scenarios)
How can I help you explore Laravel packages today?