Skip to content

Commit

Permalink
Relates to #1: Replace deprecated AMQPConnection w/ AMQPStreamConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambient-Impact committed May 18, 2024
1 parent 8ab6fe5 commit d1340c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/AMQPLibConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class AMQPLibConnector extends AbstractAMQPConnector

public function GetConnectionObject($details)
{
return new \PhpAmqpLib\Connection\AMQPConnection(
return new \PhpAmqpLib\Connection\AMQPStreamConnection(
$details['host'],
$details['port'],
$details['login'],
Expand Down Expand Up @@ -129,7 +129,7 @@ public function Consume($msg)

/**
* Return result of task execution for $task_id
* @param \PhpAmqpLib\Connection\AMQPConnection $connection
* @param \PhpAmqpLib\Connection\AMQPStreamConnection $connection
* @param string $task_id Celery task identifier
* @param int $expire expire time result queue, milliseconds
* @param boolean $removeMessageFromQueue whether to remove message from queue
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractAMQPConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function GetBestInstalledExtensionName($ssl = false)
return 'php-amqplib-ssl';
} elseif (class_exists('\AMQPConnection') && extension_loaded('amqp')) {
return 'pecl';
} elseif (class_exists('\PhpAmqpLib\Connection\AMQPConnection')) {
} elseif (class_exists('\PhpAmqpLib\Connection\AMQPStreamConnection')) {
return 'php-amqplib';
} else {
return 'unknown';
Expand Down

0 comments on commit d1340c5

Please sign in to comment.