Install SMQ SDK for PHP

Updated at:

Simple Message Queue (formerly MNS) provides an SDK for PHP to send and receive messages programmatically. Install the SDK with Composer.

Prerequisites

Before you begin, make sure that you have:

Install the SDK

Run the following command in your project directory (recommended):

composer require aliyun/aliyun-mns-php-sdk

This command adds the SDK to composer.json and installs the package.

Alternatively, declare the dependency manually:

  1. Add the SDK to the require section of composer.json:

    {
      "require": {
        "aliyun/aliyun-mns-php-sdk": ">=1.0.0"
      }
    }
  2. Install the dependency:

    composer install --no-dev
Note

Use the latest SDK version when possible. Check aliyun-mns-php-sdk on Packagist for available versions and changelogs. For a full version history, see Version record.