From 67d65de62475a833753addf32ba68565456dbc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20M=C3=B6nch?= Date: Fri, 12 Jan 2024 14:34:00 +0100 Subject: [PATCH] [Messenger][AmazonSqs] Allow async-aws/sqs version 2 --- Tests/Transport/ConnectionTest.php | 40 ++++++++++++++++++++++++++++++ composer.json | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Tests/Transport/ConnectionTest.php b/Tests/Transport/ConnectionTest.php index 2abdb5d..b49ba5c 100644 --- a/Tests/Transport/ConnectionTest.php +++ b/Tests/Transport/ConnectionTest.php @@ -17,6 +17,7 @@ use AsyncAws\Sqs\Result\ReceiveMessageResult; use AsyncAws\Sqs\SqsClient; use AsyncAws\Sqs\ValueObject\Message; +use Composer\InstalledVersions; use PHPUnit\Framework\TestCase; use Psr\Log\NullLogger; use Symfony\Component\HttpClient\MockHttpClient; @@ -342,6 +343,16 @@ public function testLoggerWithDebugOption() private function getMockedQueueUrlResponse(): MockResponse { + if ($this->isAsyncAwsSqsVersion2Installed()) { + return new MockResponse( + << @@ -357,6 +368,28 @@ private function getMockedQueueUrlResponse(): MockResponse private function getMockedReceiveMessageResponse(): MockResponse { + if ($this->isAsyncAwsSqsVersion2Installed()) { + return new MockResponse(<<=7.2.5", "async-aws/core": "^1.5", - "async-aws/sqs": "^1.0", + "async-aws/sqs": "^1.0|^2.0", "symfony/messenger": "^4.3|^5.0|^6.0", "symfony/service-contracts": "^1.1|^2|^3", "psr/log": "^1|^2|^3"