PHPackages                             buddysoft/yii2-sms - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. buddysoft/yii2-sms

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

buddysoft/yii2-sms
==================

A simple API to implement SMS Verification Code by YunPian.com

v1.2.0(3y ago)0127[1 PRs](https://github.com/liuwanwei/yii2-sms/pulls)MITPHPPHP &gt;=5.6.15

Since May 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/liuwanwei/yii2-sms)[ Packagist](https://packagist.org/packages/buddysoft/yii2-sms)[ Docs](https://github.com/liuwanwei/sms)[ RSS](/packages/buddysoft-yii2-sms/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (18)Used By (0)

sms
===

[](#sms)

sms service originally supporting YunPian

Install
-------

[](#install)

composer require buddysoft/yii2-sms dev-master

导入 sms 表
--------

[](#导入-sms-表)

./yii migrate --migrationPath=@buddysoft/sms/migrations

Yii2 项目配置
---------

[](#yii2-项目配置)

在 main.php 数组根目录下（跟 components 同级）添加类似配置：

```
'controllerMap' => [
    // 短信验证，需要 composer require buddysoft/yii2-sms "~1.0.4"
    'sms' => [
        'class' => 'buddysoft\sms\controllers\SmsController',
        'smsKey' => '6f32f42e37100d',
        'smsTemplate' => '【购物助手】您的验证码为：#code#，请在10分钟内完成验证。如非本人操作，请忽略。',
        'enableCsrfValidation' => false,
    ],
],

```

使用
--

[](#使用)

**发短信：**

- 类型：POST
- 地址：/sms/send
- 参数：mobile, pseudo

支持 pseudo 选项，并不真正调用短信发送服务，但会将生成的验证码返回给请求者。

**v1.1.3：要打开 pseudo 选项，必须配置 Yii::$app-&gt;params\['pseudoSms'\] 参数。**

**验证短信：**

- 类型：POST
- 地址：/sms/verify
- 参数：mobile, code

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

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 ~158 days

Recently: every ~144 days

Total

16

Last Release

1277d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/16d22936eaad779f55f92f099fe68ba14e67990b6c66b83dd278c7143004fc4d?d=identicon)[liuwanwei](/maintainers/liuwanwei)

---

Top Contributors

[![liuwanwei](https://avatars.githubusercontent.com/u/62382?v=4)](https://github.com/liuwanwei "liuwanwei (29 commits)")

### Embed Badge

![Health badge](/badges/buddysoft-yii2-sms/health.svg)

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

###  Alternatives

[rmrevin/yii2-ulogin

Extension for yii2 ulogin integration

1811.9k](/packages/rmrevin-yii2-ulogin)[kakadu-dev/yii2-jwt-auth

Extension provide JWT auth for Yii2

105.8k](/packages/kakadu-dev-yii2-jwt-auth)

PHPackages © 2026

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