diff --git a/analyzer/tools/message_sender.php b/analyzer/tools/message_sender.php index d3d3cc431..41c2d2563 100644 --- a/analyzer/tools/message_sender.php +++ b/analyzer/tools/message_sender.php @@ -23,9 +23,9 @@ if ($argc <= 1) $message = $argv[1]; -$connection = new AMQPConnection(HOST, PORT, USER, PASS, VHOST); -if (!isset($connection)) -{ +$connection = new AMQPStreamConnection(HOST, PORT, USER, PASS, VHOST); + +if (!isset($connection)) { echo "Failed to connect to the RabbitMQ server."; return; } diff --git a/legacy/application/models/RabbitMq.php b/legacy/application/models/RabbitMq.php index caf0f50df..d8c47038c 100644 --- a/legacy/application/models/RabbitMq.php +++ b/legacy/application/models/RabbitMq.php @@ -16,7 +16,7 @@ class Application_Model_RabbitMq { $CC_CONFIG = Config::getConfig(); - $conn = new \PhpAmqpLib\Connection\AMQPConnection( + $conn = new \PhpAmqpLib\Connection\AMQPStreamConnection( $CC_CONFIG['rabbitmq']['host'], $CC_CONFIG['rabbitmq']['port'], $CC_CONFIG['rabbitmq']['user'], @@ -99,7 +99,7 @@ class Application_Model_RabbitMq ) { $config = Config::getConfig(); - $conn = new \PhpAmqpLib\Connection\AMQPConnection( + $conn = new \PhpAmqpLib\Connection\AMQPStreamConnection( $config['rabbitmq']['host'], $config['rabbitmq']['port'], $config['rabbitmq']['user'], diff --git a/legacy/build/airtime-setup/load.php b/legacy/build/airtime-setup/load.php index 43a140942..b7ef45a63 100644 --- a/legacy/build/airtime-setup/load.php +++ b/legacy/build/airtime-setup/load.php @@ -109,7 +109,7 @@ function checkRMQConnection() $ini = parse_ini_file(BUILD_PATH . 'airtime.example.conf', true); } - $conn = new \PhpAmqpLib\Connection\AMQPConnection( + $conn = new \PhpAmqpLib\Connection\AMQPStreamConnection( $ini[RMQ_INI_SECTION]['host'], $ini[RMQ_INI_SECTION]['port'], $ini[RMQ_INI_SECTION]['user'], diff --git a/legacy/composer.json b/legacy/composer.json index a5f48a9b8..5066ddff9 100644 --- a/legacy/composer.json +++ b/legacy/composer.json @@ -21,7 +21,7 @@ "james-heinrich/getid3": "^1.9", "jooola/propel1": "dev-master", "massivescale/celery-php": "^2.1", - "php-amqplib/php-amqplib": "^2.12", + "php-amqplib/php-amqplib": "^3.0", "simplepie/simplepie": "^1.5", "zf1s/zend-acl": "^1.13", "zf1s/zend-application": "^1.13", diff --git a/legacy/composer.lock b/legacy/composer.lock index 95c9a669b..bdc14afd3 100644 --- a/legacy/composer.lock +++ b/legacy/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d1b034bac302a6e85ed632927c6c8d88", + "content-hash": "859db0c19832f3e981bccb7870b7a330", "packages": [ { "name": "composer/semver", @@ -511,22 +511,22 @@ }, { "name": "php-amqplib/php-amqplib", - "version": "v2.12.3", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/php-amqplib/php-amqplib.git", - "reference": "f746eb44df6d8f838173729867dd1d20b0265faa" + "reference": "c0a8eade209b7e43d6a405303d8de716dfd02749" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/f746eb44df6d8f838173729867dd1d20b0265faa", - "reference": "f746eb44df6d8f838173729867dd1d20b0265faa", + "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/c0a8eade209b7e43d6a405303d8de716dfd02749", + "reference": "c0a8eade209b7e43d6a405303d8de716dfd02749", "shasum": "" }, "require": { "ext-mbstring": "*", "ext-sockets": "*", - "php": ">=5.6.3,<8.0", + "php": "^7.0|~8.0.0", "phpseclib/phpseclib": "^2.0|^3.0" }, "conflict": { @@ -538,13 +538,13 @@ "require-dev": { "ext-curl": "*", "nategood/httpful": "^0.2.20", - "phpunit/phpunit": "^5.7|^6.5|^7.0", + "phpunit/phpunit": "^6.5|^7.0|^9.5", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.12-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -586,9 +586,9 @@ ], "support": { "issues": "https://github.com/php-amqplib/php-amqplib/issues", - "source": "https://github.com/php-amqplib/php-amqplib/tree/v2.12.3" + "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.0.0" }, - "time": "2021-03-01T12:21:31+00:00" + "time": "2021-03-16T15:00:23+00:00" }, { "name": "phpseclib/phpseclib", diff --git a/legacy/public/setup/rabbitmq-setup.php b/legacy/public/setup/rabbitmq-setup.php index 6e0619679..c9b6192ca 100644 --- a/legacy/public/setup/rabbitmq-setup.php +++ b/legacy/public/setup/rabbitmq-setup.php @@ -61,7 +61,7 @@ class RabbitMQSetup extends Setup public function checkRMQConnection() { - $conn = new \PhpAmqpLib\Connection\AMQPConnection( + $conn = new \PhpAmqpLib\Connection\AMQPStreamConnection( self::$_properties['host'], self::$_properties['port'], self::$_properties['user'],