PHPackages                             nnrudakov/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nnrudakov/yii2-sms

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

nnrudakov/yii2-sms
==================

Send SMS via different services in Yii2.

v2.0.1(3y ago)23.2k[1 PRs](https://github.com/nnrudakov/yii2-sms/pulls)MITPHPPHP &gt;=8.1

Since Jul 26Pushed 3y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (8)Versions (36)Used By (0)

Yii2 SMS
========

[](#yii2-sms)

Yii2 extension to send SMS via different services.

For license information check the [LICENSE](LICENSE.md)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/b5a56bf1e3637c0361c4418f20092ebaf728e552f468395647de37fb6cc809ec/68747470733a2f2f706f7365722e707567782e6f72672f6e6e727564616b6f762f796969322d736d732f762f737461626c65)](https://packagist.org/packages/nnrudakov/yii2-sms)[![Total Downloads](https://camo.githubusercontent.com/2e5580e0c7b80a2abb7e28302645f1a1d760d0ea12edb9ed0e10b243e7938ee8/68747470733a2f2f706f7365722e707567782e6f72672f6e6e727564616b6f762f796969322d736d732f646f776e6c6f616473)](https://packagist.org/packages/nnrudakov/yii2-sms)[![License](https://camo.githubusercontent.com/9b198239237324480fdd10c7cd1c0931dba1ce4fcb84d9d0607b365cdb3aa1d2/68747470733a2f2f706f7365722e707567782e6f72672f6e6e727564616b6f762f796969322d736d732f6c6963656e7365)](https://packagist.org/packages/nnrudakov/yii2-sms)

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1 (use v1.3.1 if you need PHP earlier 8.0)
- Yii2 &gt;= 2.0.41

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require --prefer-dist nnrudakov/yii2-sms

```

or add

```
"nnrudakov/yii2-sms": "^2.0"

```

to the require section of your `composer.json` file.

Configuration
-------------

[](#configuration)

Add the following in your config:

```
...
    'components' => [
        'sms' => [
            'class' => nnrudakov\sms\Sms::class,
                'services' => [
                    'beeline' => [
                        'class'    => nnrudakov\sms\services\beeline\Beeline::class,
                        'user'     => '',
                        'password' => ''
                    ]
                ]
        ],
        ...
    ],
...
```

You can override message [translations](http://www.yiiframework.com/doc-2.0/guide-tutorial-i18n.html#message-translation):

```
...
    'components' => [
        'i18n' => [
            'translations' => [
                'sms' => [ // must be the same name
                    'class'            => yii\i18n\PhpMessageSource::class,
                    'basePath'         => '@app/messages',
                    'sourceLanguage'   => 'ru',
                    'forceTranslation' => true
                ],
            ],
        ],
        ...
    ],
...
```

As an example full list messages you can find in [russian](src/messages/ru/sms.php) message file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by:

```
 $service = Yii::$app->sms->getService('beeline');
 $service->send(['+7905XXXXXXX'], 'message');
```

Extension may throw exceptions in critical situations or fill up internal erorrs list. You can checkout errors by:

```
 $service->hasErrors();
```

To get full errors list just call:

```
 $service->getErrors();
```

To get error for certain phone number add number as parameter:

```
 $service->getErrors('+7905XXXXXXX');
```

Services
--------

[](#services)

Extension implements these services:

- *Beeline*. Signed contract and credentials to [account](https://beeline.amega-inform.ru/) are required. You should paste credentials in service config:

```
...
    'beeline' => [
        'class'    => nnrudakov\sms\services\beeline\Beeline::class,
        'user'     => 'beeline_user',
        'password' => 'beeline_password'
    ]
...
```

Tests
-----

[](#tests)

For tests uses [Codeception](http://codeception.com/docs/).

```
vendor/bin/codecept run unit

```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

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

Recently: every ~257 days

Total

33

Last Release

1421d ago

Major Versions

v0.3.0 → v1.0.02017-07-27

v1.3.1 → v2.0.02021-03-08

PHP version history (6 changes)v0.1.0PHP &gt;=7.0

v1.1.0PHP &gt;=7.2

v1.3.0PHP &gt;=7.3

v1.3.1PHP &gt;=7.3 &lt;8.0

v2.0.0PHP &gt;=8.0

v2.0.1PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/89f7e6bddf6d28261727ac95608fab422181c870ba2de6b20505e4372f900136?d=identicon)[nnrudakov](/maintainers/nnrudakov)

---

Top Contributors

[![nnrudakov](https://avatars.githubusercontent.com/u/4459314?v=4)](https://github.com/nnrudakov "nnrudakov (111 commits)")

---

Tags

beelinesmsyii2smsyii2gatewayBeeline

###  Code Quality

TestsCodeception

### Embed Badge

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

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

###  Alternatives

[daixianceng/yii2-smser

Yii2 SMS extension

862.9k1](/packages/daixianceng-yii2-smser)[saviorlv/yii2-dysms

Aliyun SMS SDK for Yii2

1316.5k1](/packages/saviorlv-yii2-dysms)[abhi1693/yii2-sms

Send Free Sms for Yii2

171.9k](/packages/abhi1693-yii2-sms)

PHPackages © 2026

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