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

Aliyun Sms Sdk Laravel Package

mrgoon/aliyun-sms-sdk

mrgoon/aliyun-sms-sdk is a lightweight PHP/Laravel wrapper for Alibaba Cloud (Aliyun) SMS. It simplifies sending verification codes and notifications through the Aliyun SMS API, with straightforward configuration and easy integration into Laravel applications via Composer.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. mrgoon/aliyun-sms-sdk is a thin, framework-agnostic wrapper around Aliyun's legacy Dysmsapi (SMS) endpoint rather than a native Laravel package. There is no service provider, facade, config file, or notification channel — so it does not slot into Laravel's container, queue, or notification pipelines without bespoke glue. In a Laravel app it would live as an infrastructure adapter behind a domain-level SmsSender interface, invoked from a queued job or a custom notification channel. That is workable, but it means we are adopting "a set of PHP classes" and building the Laravel-shaped layer ourselves.

Integration feasibility. Feasible but modest effort. Composer install is a single require, and the API surface is presumably a small client class (sendSms, template param encoding, sign/timestamp generation). The real cost is not the SDK — it is the surrounding scaffolding a production SMS path requires: config/credential management via config/services.php and .env, retry and backoff, idempotency keys, delivery-report handling, templated message construction, and tests with an HTTP fake. Expect roughly 1–2 engineer-days for a first working send plus 3–5 days to make it production-grade (logging, metrics, failure handling, feature-flagged rollout).

Technical risk. High, and concentrated in provenance rather than code complexity:

  • Abandonment. Last release October 2017, 4 stars, 0 dependents. No security patching, no PHP 8.x verification, no response to Aliyun API changes. Effectively an unmaintained fork-of-a-fork.
  • Superseded by official tooling. Alibaba Cloud ships alibabacloud/dysmsapi-20170525 (and the older alibabacloud/sdk), which is maintained, signed, and versioned against the current OpenAPI. Using a 2017 third-party wrapper instead carries a standing "why are we not on the vendor SDK?" question in any architecture or security review.
  • API drift. Legacy request signing and endpoint conventions can be deprecated or tightened (region, signature algorithm, template audit requirements). Silent breakage in production SMS is a customer-visible failure.
  • Supply chain. Low-visibility maintainer, minimal download volume, no audit trail. Composer will pull it, but it is not a package we can defend in a vendor-risk review without a fork-and-own decision.
  • Laravel fit gap. No Illuminate integration means no first-class queue/notification support, and any Laravel-version bump is untested against this code.

Key questions.

  1. Is Aliyun SMS a hard requirement (China-resident recipients, ICP/compliance), or can a maintained multi-region provider (Twilio, Vonage, Aliyun-official) be substituted? This single answer determines whether we evaluate this package at all.
  2. Does the intended Aliyun account/region still accept the legacy signing scheme this SDK implements, or will it fail against the current console-provisioned credentials?
  3. Are we willing to fork and vendor the package internally, taking on maintenance, or must we stay on a maintained upstream?
  4. What is the realistic PHP version and Laravel version target — and has anyone verified this code under 8.2/8.3 and Laravel 10/11?
  5. What is the compliance posture for message content and recipient data (template approval, PII retention, audit logging)?

Integration Approach

Stack fit. Poor-to-adequate as-is, good once wrapped. The package assumes a plain PHP runtime with Guzzle/cURL and an access key/secret pair. Laravel expects credentials in config/services.php populated from .env, resolution through the container, and dispatch through Notifiable/Notification or a queued job. The recommended shape is a single AliyunSmsClient adapter implementing our own SmsGateway contract, bound in a service provider, with the third-party class kept out of application code. That boundary is what makes the eventual swap to the official SDK a one-file change.

Migration path. Treat this as a bridge, not a destination. Two viable paths:

  • Path A (recommended): skip this package. Integrate alibabacloud/dysmsapi-20170525 directly behind the same SmsGateway interface. Slightly more setup, materially less long-term risk, and vendor-supported.
  • Path B (if a spike is needed fast): adopt this SDK now behind the interface, ship behind a feature flag to a small traffic slice, and schedule replacement with the official SDK within one quarter. The interface boundary makes the replacement a contained refactor.

Either way, the application-layer contract (send(templateId, phoneNumbers, params)) should be defined first and owned by us, not inherited from the package's method signatures.

Compatibility. Unverified against modern PHP and Laravel. Before committing, run a spike: install under the target PHP version, confirm no deprecated constructs, and exercise a real send in a sandbox Aliyun account. Also confirm Guzzle major-version compatibility — a 2017 package may pin Guzzle 5/6, which conflicts with current Laravel HTTP client dependencies and can force a Composer resolution fight. That dependency-graph check is the most likely blocker and should be done before any sprint commitment.

Sequencing.

  1. Confirm the business requirement for Aliyun SMS and rule out provider substitution.
  2. Spike: install, send one real message in sandbox, verify Composer resolves against current Laravel.
  3. Define the SmsGateway interface and config contract; build the adapter.
  4. Add queue integration, retry/backoff, idempotency, and structured logging.
  5. Ship behind a feature flag to internal recipients, then a small percentage of production traffic.
  6. If on Path B, open the replacement ticket immediately with a dated deadline.

Operational Impact

Maintenance. This is the dominant cost. An unmaintained 2017 package with 4 stars and 0 dependents means we are the maintainers the moment it breaks. Budget for a named owner, a fork in our VCS, and a documented patch process. Compare against the official Alibaba SDK, where maintenance is a vendor responsibility. The delta here is real, recurring engineering overhead for a commodity capability.

Support. No upstream support channel, no issue triage, no security advisories. Internal support depends entirely on our own documentation and runbooks. On-call engineers will have no external escalation path for "SMS stopped sending" — they will be reading Aliyun console error codes and this package's source. That is an acceptable trade for a prototype and a poor one for a revenue-critical notification path.

Scaling. SMS volume itself is not a scaling concern — the vendor absorbs it. Our scaling concerns are throughput against Aliyun rate limits (per-account QPS and per-number daily caps), which the SDK does not handle for us. We must own batching, queue concurrency limits, and rate-limit-aware backoff. Delivery receipts are typically asynchronous callbacks; the SDK's role there is unclear and likely absent, so receipt ingestion and reconciliation is our build regardless of which SDK we choose.

Failure modes.

  • Silent signature/credential breakage after an Aliyun-side change → messages rejected, no alert unless we instrument response codes.
  • Composer dependency conflict on a Laravel upgrade → blocked upgrade or forced emergency fork.
  • Unhandled API errors surfaced as generic exceptions → poor diagnostics, slow incident resolution.
  • Duplicate sends from queue retries without idempotency keys → cost and customer annoyance.
  • Template parameter encoding bugs (common in China SMS JSON param payloads) → rejected messages with opaque error codes.
  • No delivery confirmation → we believe messages sent when they were not.

Each of these needs an explicit mitigation: response-code metrics and alerting, a documented fork policy, idempotency at the job level, and a template-parameter contract test.

Ramp-up. Low for a PHP engineer to call the SDK (it is small), moderate to operate it (Aliyun console concepts, template approval workflow, signature management, error taxonomy). Realistically one engineer-day to proficiency on the code, plus time to learn the Aliyun SMS console and compliance workflow — which is required regardless of SDK choice. The package-specific ramp-up is trivial; the surrounding operational knowledge is the actual investment.

Bottom line for a TPM. The integration effort is small; the ownership burden is not. Recommend the official Alibaba Cloud SDK behind an internal SmsGateway contract, and treat mrgoon/aliyun-sms-sdk as acceptable only for a short, flagged spike. The score and opportunity signal here are low for good reason: the package works, but it transfers maintenance risk to us for a capability where a maintained vendor SDK already exists.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast