Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Oss Sdk Php Laravel Package

aliyuncs/oss-sdk-php

Alibaba Cloud OSS SDK for PHP lets you upload, download, and manage any files on Alibaba Cloud Object Storage from PHP 5.3+ applications via Composer, requiring the cURL extension.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Cloud vendor commitment / data-residency choice. This SDK is the credible PHP path into Alibaba Cloud OSS. It materially reduces the cost of a "serve users in mainland China" decision, because the storage integration is a solved problem rather than a bespoke one. If China is on the roadmap, this belongs in the architecture decision record alongside CDN and ICP filing.
  • Storage tiering and unit-economics work. The package exposes IA and Archive bucket/object classes, restoreObject, getBucketStat, and traffic-limit parameters. That is enough to run a real cost model — hot vs. cold storage, retrieval costs, egress — without waiting for an infra ticket.
  • Compliance and retention roadmap. Bucket WORM (retention/compliance lock), versioning, bucket encryption, bucket policy, object tagging, and ACLs are all present. If legal or an enterprise customer asks "can you guarantee immutability and auditability of stored documents," the answer is a configuration question, not a six-month build.
  • Upload UX and feature bets. Multipart upload, pre-signed URLs (including response-* overrides), append object, uploading from a file handle, and symlink support cover the mechanics of direct-to-cloud uploads, resumable uploads, and time-limited share links. These are the primitives behind "upload big files from mobile," "share a private file with a customer," and "let the browser talk to storage instead of our app servers."
  • Media pipeline scope. The v2.1.0 additions (image service, RTMP) mean thumbnail generation, format conversion, and live-stream ingest can be evaluated as buy/configure rather than build a transcoding service.
  • Build vs. buy on Laravel glue. The critical PM finding: this is a vendor SDK, not a Laravel package. There is no service provider, facade, config file, or Storage::disk('oss') filesystem driver in the repo. So the real decision is three-way: (a) adopt the SDK plus in-house Laravel glue, (b) adopt the SDK plus a community Laravel OSS adapter, or (c) skip it entirely by pointing Laravel's native S3 driver at an S3-compatible endpoint. Budget this explicitly — it is one to three sprints of integration, testing, and operational polish (credential handling, retries, error mapping, local test doubles), not a composer require.
  • Lock-in hedging. Because the integration cost is glue rather than deep coupling, a Flysystem-style abstraction keeps an exit ramp to S3/GCS/MinIO. That is a cheap insurance policy worth deciding now rather than after the first hundred thousand objects.

When to Consider This Package

Adopt when:

  • You are already on, or committed to, Alibaba Cloud, and need OSS access from PHP/Laravel.
  • You need China-region data residency, or lower latency for mainland users than a non-China bucket can deliver.
  • You need OSS-specific capabilities that generic S3 tooling will not give you cleanly: image processing, RTMP ingest, WORM, bucket transfer acceleration, request-payment (requester-pays) buckets.
  • Your team can own a thin adapter layer, or you have validated a community Laravel adapter against your PHP/Laravel versions.
  • You want an MIT-licensed, actively maintained dependency — release cadence is steady, the changelog is unusually thorough, and PHP 8.5 compatibility is already handled.

Look elsewhere when:

  • You have no Alibaba Cloud relationship and no China requirement. Laravel's built-in S3 driver against any S3-compatible provider (S3, R2, MinIO, Wasabi) is dramatically less work and avoids a China-cloud account, billing, and compliance surface you do not need.
  • You need a batteries-included Laravel package. This is not one; expect to write or vet the glue.
  • You require a stable, non-beta long-term API and are unwilling to do a second migration. Note the version trap: the README itself flags that V1 (this package) has a V2 rewrite in beta with redesigned auth, retry, paginator, and transfer-manager behavior. Pinning to ~2.x is safe today, but plan for a V2 migration and do not let V1 idioms leak into dozens of call sites — wrap it.
  • Your workloads are highly concurrent/high-throughput and you want a client tuned for that; evaluate the V2 SDK's transfer manager before committing V1 to a large-scale upload path.
  • You expect heavy community support and a deep ecosystem of answers. Star count (~1k) is modest, the "dependents" signal is weak, and support runs through Alibaba Cloud tickets and Chinese-language forums — factor in support-language overhead for your on-call team.
  • Long-running or unusual runtime setups: the library is cURL-based with PHP 5.3+ lineage. Swoole compatibility exists but is a known sharp edge; validate in your actual runtime before betting on it.

Decision gate: I would not greenlight this on the SDK's merits alone. I would greenlight it on the China strategy and treat the SDK as a solved, low-risk component of that bet.

How to Pitch It (Stakeholders)

To executives (one paragraph): If we decide to serve users in mainland China, storage is one of the few pieces we do not have to invent. Alibaba's official PHP SDK is free (MIT), maintained, and already covers the enterprise checklist — encryption, versioning, immutable retention for compliance, lifecycle tiering to cut storage cost, and direct browser uploads. Adopting it costs us roughly one to three sprints of integration work plus ongoing ownership of a thin wrapper. The strategic caveat is that it only pays off if we commit to Alibaba Cloud; without a China requirement, our existing S3-compatible setup is cheaper and simpler, and I would recommend we not take this on.

To engineering: This is a raw vendor SDK, not a Laravel package — no service provider, no filesystem driver, no config publishing. You will write the adapter: credential sourcing from env/secret manager, an OssClient singleton, a Storage::disk('oss') driver or Flysystem adapter, retry/timeout policy, and error mapping into our existing exception handling. Two things to get right up front: (1) wrap, don't sprinkle — keep all SDK calls behind one internal storage interface so the upcoming SDK V2 rewrite (already in beta, with different auth/retry/transfer semantics) is a swap, not a refactor; (2) pin ~2.x and treat V1 idioms as temporary. It is cURL-based and PHP 5.3+ lineage, so validate against our runtime — Swoole in particular has a history of edge cases. Add a bucket-backed integration test suite and a local fake so CI does not depend on cloud credentials.

To security/compliance: Bucket-level WORM retention, encryption, versioning, bucket policy, ACLs, and request signing (including Signature V4 and a credentials-provider abstraction) are all supported out of the box. Access keys must not live in code — use the environment-variable or custom credentials provider rather than hardcoded AccessKeyId/AccessKeySecret as shown in the README sample.

Ask: Approve a short spike (2–3 days) to validate the wrapper approach against our Laravel and PHP versions and confirm the China requirement is real. That spike either de-risks the integration or kills the initiative cheaply.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib