PHPackages                             aliyun/aliyun-mns-php-sdk - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. aliyun/aliyun-mns-php-sdk

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

aliyun/aliyun-mns-php-sdk
=========================

Aliyun Message and Notification Service SDK for PHP, PHP&gt;=5.5.0

1.4.0(11mo ago)36275.2k↓50.9%26[1 issues](https://github.com/aliyun/aliyun-mns-php-sdk/issues)[5 PRs](https://github.com/aliyun/aliyun-mns-php-sdk/pulls)12MITPHPPHP &gt;=5.5.0

Since Apr 19Pushed 11mo ago8 watchersCompare

[ Source](https://github.com/aliyun/aliyun-mns-php-sdk)[ Packagist](https://packagist.org/packages/aliyun/aliyun-mns-php-sdk)[ Docs](https://github.com/aliyun/aliyun-mns-php-sdk)[ RSS](/packages/aliyun-aliyun-mns-php-sdk/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (12)

MNS SDK for PHP
===============

[](#mns-sdk-for-php)

Aliyun MNS Documents:

Aliyun MNS Console:

Intall Composer
---------------

[](#intall-composer)

To install composer by following commands, or see [composer](https://docs.phpcomposer.com/00-intro.html)

```
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
```

Install &amp; Use
-----------------

[](#install--use)

Add require to your `composer.json`

```
{
  "require": {
     "aliyun/aliyun-mns-php-sdk": ">=1.0.0"
  }
}
```

Use Composer to install requires

```
composer install
```

*Note: php version&gt;=5.5.0, and xml extension of php is required.*

Run the Samples
---------------

[](#run-the-samples)

[Queue Sample](https://github.com/aliyun/aliyun-mns-php-sdk/blob/master/Samples/Queue/CreateQueueAndSendMessage.php)
[Topic Sample](https://github.com/aliyun/aliyun-mns-php-sdk/blob/master/Samples/Topic/CreateTopicAndPublishMessage.php)

The basic steps are:

1. Set AliCloud AK/SK In Env, please see: [configure-the-alibaba-cloud-accesskey-environment](https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems)
2. Run (In the SDK root directory):
    - `CreateQueueAndSendMessage.php` : Set the `Endpoint` at the bottom and Run `php Samples/Queue/CreateQueueAndSendMessage.php`.
    - `CreateTopicAndPushMessageToQueue.php` : Set the `Endpoint` at the bottom and Run `Samples/Topic/CreateTopicAndPushMessageToQueue.php`.
    - `CreateTopicAndPublishMessage.php` : Set the `Endpoint`, `ip` and `port` at the bottom and Run `Samples/Topic/CreateTopicAndPublishMessage.php`.
    - `TopicSubscribe.php` : Set the `Endpoint`, `region` and `accountId` at the bottom and Run `Samples/Topic/TopicSubscribe.php`.

Run the Tests
-------------

[](#run-the-tests)

The basic steps are:

1. Set AliCloud AK/SK/Endpoint In `Tests/aliyun-mns.ini`.
2. In the SDK root directory, run `vendor/bin/phpunit`.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance51

Moderate activity, may be stable

Popularity48

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~765 days

Total

4

Last Release

336d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cf75da828b4e491fdf1334ded10f9cb85e30cd83a6e9ab72cbc4801f8e41bd30?d=identicon)[aliyun\_storage](/maintainers/aliyun_storage)

---

Top Contributors

[![zd-double](https://avatars.githubusercontent.com/u/16774152?v=4)](https://github.com/zd-double "zd-double (7 commits)")[![liuquanhao](https://avatars.githubusercontent.com/u/7736182?v=4)](https://github.com/liuquanhao "liuquanhao (2 commits)")[![souriki](https://avatars.githubusercontent.com/u/808791?v=4)](https://github.com/souriki "souriki (2 commits)")[![Houlong66](https://avatars.githubusercontent.com/u/32865414?v=4)](https://github.com/Houlong66 "Houlong66 (1 commits)")[![Pius-Z](https://avatars.githubusercontent.com/u/50170470?v=4)](https://github.com/Pius-Z "Pius-Z (1 commits)")[![xdkxlk](https://avatars.githubusercontent.com/u/10397306?v=4)](https://github.com/xdkxlk "xdkxlk (1 commits)")

---

Tags

mnsmessagenotificationaliyunmnsmessage service

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aliyun-aliyun-mns-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/aliyun-aliyun-mns-php-sdk/health.svg)](https://phpackages.com/packages/aliyun-aliyun-mns-php-sdk)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[oat-sa/tao-core

TAO core extension

66143.7k122](/packages/oat-sa-tao-core)

PHPackages © 2026

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