PHPackages                             saviorlv/yii2-dysms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. saviorlv/yii2-dysms

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

saviorlv/yii2-dysms
===================

Aliyun SMS SDK for Yii2

1.1.4(7y ago)1317.0k↓33.8%51Apache-2.0PHPPHP &gt;=5.5.0

Since Oct 25Pushed 7y agoCompare

[ Source](https://github.com/sunmking/yii2-dysms)[ Packagist](https://packagist.org/packages/saviorlv/yii2-dysms)[ Docs](https://github.com/saviorlv/yii2-dysms)[ RSS](/packages/saviorlv-yii2-dysms/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (7)Used By (1)

aliyun-dysms
============

[](#aliyun-dysms)

安装
--

[](#安装)

```
composer require "saviorlv/yii2-dysms:dev-master"
```

> or添加下列代码在composer.json文件中并执行composer update 操作

```
{
    "require": {
       "saviorlv/yii2-dysms":"dev-master"
    }
}
```

设置方法
----

[](#设置方法)

#### 全局使用

[](#全局使用)

> 在config/main.php配置文件中定义component配置信息

```
'components' => [
  .....
  'aliyun' => [
      'class' => 'saviorlv\aliyun\Sms',
      'accessKeyId' => '123455',
      'accessKeySecret' => '122345666'
    ],
  ....
]
```

> 代码中调用（调用短信发送接口示例）

```
// 单条发送
$response = Yii::$app->aliyun->sendSms(
            "孙坤峰", // 短信签名
            "SMS_76350132", // 短信模板编号
            "136*****134", // 短信接收者
            Array(  // 短信模板中字段的值
                "code"=>"12345",
                "product"=>"dsd"
            ),
            "123"
        );
        print_r($response);

//批量发送

$response = Yii::$app->aliyun->sendBatchSms(
            array("孙坤峰","孙坤峰"), // 短信签名
            "SMS_76350132", // 短信模板编号
            array("136*****134","180*****459"), // 短信接收者
            array(array(  // 短信模板中字段的值
                "code"=>"12345",
                "product"=>"dsd"
            ),array(  // 短信模板中字段的值
                "code"=>"123456",
                "product"=>"dsd"
            )),
            "123"
        );
//批量发送 签名、手机号、模板字段 数组长度必须相等

如上所示 180*******259收到的短信 签名是"孙坤峰" 内容为  123456
```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~62 days

Recently: every ~78 days

Total

6

Last Release

2860d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c9ecc98eec8f6e243c91d53019ffa4d86dab5da58a89d3d23d1523ebe4fec5ea?d=identicon)[sunmking](/maintainers/sunmking)

---

Top Contributors

[![sunmking](https://avatars.githubusercontent.com/u/33918985?v=4)](https://github.com/sunmking "sunmking (24 commits)")

---

Tags

aliyunaliyun-smsdysmsphpyii2sdksmsyii2aliyun

### Embed Badge

![Health badge](/badges/saviorlv-yii2-dysms/health.svg)

```
[![Health](https://phpackages.com/badges/saviorlv-yii2-dysms/health.svg)](https://phpackages.com/packages/saviorlv-yii2-dysms)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
