liz/flysystem-qiniu
liz/flysystem-qiniu is a Flysystem adapter for Qiniu cloud storage. It lets Laravel and PHP applications use Qiniu as a filesystem disk, so you can upload, read, and delete files through Flysystem's unified API with minimal configuration.
Architecture fit. The package is a thin Flysystem adapter that delegates object operations to qiniu/php-sdk and plugs into Laravel's Storage facade through the standard custom-driver pattern (Storage::extend / a filesystem service provider). Architecturally this is the right shape: it keeps Qiniu-specific code at the edge, leaves application code written against Illuminate\Support\Facades\Storage, and makes the backend swappable via disk configuration. Conceptually it fits a Laravel codebase with no structural changes. v1.23 does not change this — the release note ("添加php8.0使用" / "add PHP 8.0 support") describes a compatibility edit, not an architectural one, and there is no evidence the adapter contract was touched.
The real issue is version alignment, not design — and v1.23 does not address it. PHP 8.0 support is a runtime-version constraint fix. The blocking problem is Flysystem major version. Flysystem 1 → 2 → 3 was a breaking rewrite of the adapter contract (AdapterInterface → FilesystemAdapter, typed Config/Visibility objects, changed method signatures, DirectoryListing return types). A four-year-dormant adapter receiving a single PHP-version patch is still almost certainly v1-era, possibly partial v2. Laravel 9/10/11 pin league/flysystem ^3, so composer require will either hard-conflict or require pinning the framework back — which is not a viable long-term position. Crucially, PHP 8.0 support is orthogonal to Flysystem 3 support; satisfying one does not advance the other. Note also that PHP 8.0 itself reached end-of-life in November 2023, so this release targets a runtime that is already unsupported upstream — a lagging indicator rather than a modernization signal.
Integration feasibility. Feasible, but still only as fork-and-port rather than as a dependency. The v1.23 patch makes the artifact marginally more installable on PHP 8.0 environments, but installability was never the binding constraint — the Flysystem contract was. Porting to Flysystem 3 remains bounded work: one class implementing FilesystemAdapter plus normalization of exceptions, visibility, and listing — realistically 3–5 engineer-days including tests. The harder, unbounded work is the semantic gap between S3-style filesystem abstractions and Qiniu Kodo: no true directories (prefix emulation), bucket-level rather than object-level ACLs, paginated/truncated listContents, per-request upload tokens, and signed download URLs for private buckets.
Technical risk.
liz/ vendor namespace, strongly suggesting a republished personal fork. License and upstream attribution must be verified before any commercial use; a missing or copied license is a blocker, not a footnote. v1.23 provides no clarification here.url() for private buckets are all likely to behave differently than callers expect.composer.json php constraint only, or also bumped qiniu/php-sdk / Flysystem. That distinction determines whether this is a no-op for our purposes.Key questions.
composer.json constraint after v1.23?composer.json only, or code? Provide the diff, not the changelog line.listContents paginated to completion, and does it honor the deep flag?qiniu/php-sdk version, and is it itself current?Stack fit. Marginally improved at the low end, unchanged at the high end. v1.23 makes the package viable on PHP 8.0 / Laravel ≤8 / Flysystem 1 — a stack that is itself approaching or past end-of-life. It remains poor-to-unusable for Laravel 9+ without modification, because the Flysystem 3 contract gap is untouched. Qiniu Kodo itself is a solid, cost-effective, China-region-optimized object store with strong CDN and image-processing (fop) integration — the storage choice is defensible even where this package is not.
Options, ranked.
league/flysystem-aws-s3-v3 — a first-party-maintained adapter — and treat Qiniu as a commodity S3 target. Zero custom code to own. Requires a verification spike; compatibility is partial and should be tested, not assumed. Unaffected by v1.23.qiniu/php-sdk. Justified only if the fork's internals prove untrustworthy.Migration path. The critical enabler is the disk-name indirection: application code should only ever reference Storage::disk('assets'). If that holds, swapping the underlying driver is a config and service-provider change, not an application refactor. For existing data, plan a parallel-run: write to both old and new backends behind a feature flag, backfill historical objects with a one-off job, verify checksums and key parity, then cut over reads and retire the old path.
Compatibility matrix to nail down before committing: Laravel version × PHP version × league/flysystem major × qiniu/php-sdk version × Qiniu region/zone config. v1.23 fills in one cell — PHP 8.0 — and leaves the Flysystem and SDK cells blank. A single unsupported cell still invalidates the whole option; the most likely remaining blockers are Flysystem 3 and any PHP version above 8.0.
Sequencing. (1) License and provenance audit, diff against upstream. (2) Pull the v1.23 diff and confirm whether it is constraint-only or code. (3) Composer spike in a scratch app on the target Laravel version — a 30-minute experiment that de-risks everything downstream, and the fastest way to falsify any hope that v1.23 unblocked us. (4) Build the adapter contract test suite first (put/get/exists/delete/list/url/visibility/large file/CJK keys/private bucket). (5) Decide buy-vs-build based on the spike. (6) Parallel-run and backfill. (7) Cutover behind the stable disk name.
Maintenance. The dominant cost is that you inherit ownership. Budget roughly 1–2 engineer-days per quarter for SDK bumps, Qiniu API drift, and PHP/Laravel compatibility — and a larger one-off hit whenever Flysystem ships its next major. v1.23 is a reminder that upstream maintenance is sporadic and reactive: it arrived roughly three years after PHP 8.0 shipped and does not extend to PHP 8.1+. Do not plan against its cadence. Compare against effectively zero for a first-party S3 adapter, which remains the strongest argument for option 1.
Support. Still a single maintainer, no SLA, no release cadence, issues likely in Chinese and possibly unanswered. The v1.23 release note is a bare sentence with no linked PR, no test evidence, and no migration guidance — which is itself a signal about support quality. Qiniu's own documentation is thorough but primarily Chinese-language, so the real support surface is your team's Qiniu fluency, not the package. Zero dependents means no ecosystem: no Stack Overflow corpus, no third-party fixes to lean on, no signal that anyone else has hit your bug.
Scaling. The adapter is stateless and adds negligible overhead — scale is a Qiniu property, not a package property. The practical ceilings are Qiniu API QPS quotas per bucket, upload/download token generation rate, and PHP's HTTP client concurrency. High-concurrency write paths should go through a queue with bounded workers rather than synchronous request-time uploads. Large objects need multipart upload and should never be streamed through a web request. No change from v1.23.
Failure modes to instrument.
listContents returning a truncated page and callers treating it as complete.Ramp-up. A Laravel developer is productive against the Storage facade in hours regardless of backend — that is the abstraction doing its job. Understanding the fork's internals (needed for any bug fix) is a few days. Genuine Qiniu operational fluency — private buckets, token signing, CDN invalidation, fop pipelines — is the long pole and should be treated as a distinct skill to staff for, independent of this package decision. v1.23 does not shorten any of this.
How can I help you explore Laravel packages today?