Set up the required dependencies before using the ApsaraMQ for RocketMQ 4.x SDK for PHP to send and subscribe to messages.
Prerequisites
Before you begin, make sure that you have:
PHP 5.5.0 or later installed. For download and installation instructions, see Installation and Configuration.
Composer installed. For download instructions, see Install Composer.
Verify your PHP version:
php -vIf your PHP version is earlier than 7.2.5, you must downgrade Composer to version 2.2.x or earlier. Later Composer versions are not compatible with PHP versions below 7.2.5.
Install the SDK
Add the
aliyunmq/mq-http-sdkdependency to thecomposer.jsonfile in your PHP installation directory:{ "require": { "aliyunmq/mq-http-sdk": ">=1.0.4" } }Install the dependency:
composer installComposer downloads the SDK package to the
vendor/directory.
What's next
Send messages
Subscribe to messages