topthink/think-filesystem
Filesystem abstraction for ThinkPHP, built on Flysystem, providing a unified API for local and cloud storage drivers such as Aliyun OSS, Qiniu, and AWS S3. Handles file uploads, reads, writes, deletes, and URL generation through a simple, consistent interface.
league/flysystem for ThinkPHP 6/8. The decision it supports is "do not build a storage abstraction layer" — local disk, S3-compatible, Alibaba OSS, Tencent COS and similar drivers are commodity plumbing, and the right call is to consume the framework's adapter instead of owning driver code.Illuminate\Filesystem + Flysystem integration. The low star/dependent counts are also misleading: the package is typically pulled in transitively by the ThinkPHP framework/skeleton, so direct-dependency signals understate real usage.Adopt when:
Look elsewhere when:
StorageService port and treat this as one replaceable adapter behind it.Executive summary: This is low-risk, zero-cost commodity glue that ships with the ThinkPHP framework — it standardizes how the product reads and writes files across local disk and cloud object storage. It is not a strategic investment and it is not a differentiator; it is the plumbing that lets us switch storage providers without rewriting features. The only real risk is that it is community-maintained by a single organization with a small public footprint, so we should use it as-is, avoid building proprietary extensions on top of it, and keep our own thin interface in front of it so a provider or framework change is a one-file swap. No procurement, licensing or headcount implications.
For engineering: thin adapter over league/flysystem exposing a ThinkPHP-style filesystem manager; drivers and Flysystem major versions are constrained by the framework release, so upgrades ride the ThinkPHP upgrade train, not an independent one. Do not fork or patch it into your domain logic. Do wrap it: define an internal StorageService port (put/get/url/delete/exists, tenant-scoped prefixes, signed-URL TTLs) and bind this package as the default implementation. That gives us a clean seam for tests, for a second provider, and for a future framework migration — and it keeps the blast radius of an abandoned upstream at roughly one adapter class.
Explicit caveat for stakeholders: if the question was "should we use this in our Laravel product," the answer is no — Laravel has an equivalent built in. This assessment applies only to ThinkPHP-based services.
How can I help you explore Laravel packages today?