qcloud/cos-sdk-v5
Official Tencent Cloud COS SDK for PHP. Provides a simple API for object storage: upload, download, copy, delete, batch operations, bucket and object management, multipart uploads, signatures, and temporary credentials. Composer-friendly and easy to integrate into Laravel/PHP apps.
AIGCMetadata on transcode/remux jobs and a query API for AIGC audio/video metadata tags. This matters because China's AIGC content-labeling rules require generated audio/video to carry identifiable provenance markers — if we ship AI-generated media (voiceover, avatar video, image generation) to Chinese users, implicit metadata labeling is a launch blocker we would otherwise solve ourselves. Decision this informs: whether AI media features are gated on vendor capability rather than an in-house labeling pipeline. Confirm specifics with legal before treating the SDK parameter as sufficient compliance.Adopt when:
Look elsewhere when:
league/flysystem-aws-s3-v3) keeps Laravel's Storage facade intact and the backend swappable. Calling the SDK directly couples business code to COS.cos-sdk-v5-6.tar.gz (PHP ≥5.6 <7.2.5, Guzzle 6) and cos-sdk-v5-7.tar.gz (PHP ≥7.2.5, Guzzle 7), which implies a manual-tarball install path alongside Composer. Confirm the Packagist package resolves the correct Guzzle major for our PHP version in CI before committing; a mismatched Guzzle major is a class of integration failure we should not discover in staging.To executives: We can skip building and operating storage infrastructure — no capacity planning, no replication engineering, no on-call for disk failures. It's pay-per-GB and MIT-licensed, so there's no license cost; the real spend is the storage and egress bill, which we should model per terabyte before committing. The strategic point is China: if that market is on the roadmap, a domestic object store is a compliance requirement rather than a preference, and Tencent is one of two realistic vendors. The latest release adds AIGC metadata tagging on media transcoding, which maps directly onto China's AI-generated-content labeling rules — so if we ship AI-generated video or audio to Chinese users, this reduces a compliance requirement to a configuration option. That makes this a market-access decision, not just a technical convenience.
To engineering: This is the official first-party PHP SDK for COS v5 — MIT, actively released. The low star count is expected for vendor SDKs and is not a quality signal; what it does mean is that we own the integration and won't find many blog posts when something breaks. My recommendation is to adopt it, but confine it: put every call behind a small internal storage interface (or use Laravel's Filesystem/Flysystem with a COS adapter) so the SDK appears in exactly one place. Start with the capabilities that actually justify the dependency — multipart upload, pre-signed URL generation, and, if AIGC media is in scope, transcode/remux with AIGCMetadata plus the metadata query API — and hand-roll nothing that touches signing or chunking. Note the v2.6.17 packaging: PHP-version-conditional Guzzle 6 vs Guzzle 7 builds, so pin and test the resolved dependency in CI rather than relying on a manual tarball.
Risks to name up front: vendor lock-in on a non-portable API surface, thin community support, and egress cost surprises. Add a compliance risk to that list: treat the AIGC metadata parameter as a technical control whose sufficiency legal must confirm, not as a compliance certification. All of these are manageable with an abstraction layer, a monthly egress budget alert, and a written dependency policy for the Guzzle major. What we should not do is build a self-hosted fallback path we never exercise — that's cost without insurance.
How can I help you explore Laravel packages today?