From 4bfea871f2f848bb0a446c7a604a866c3008d754 Mon Sep 17 00:00:00 2001 From: NairanOmura Date: Fri, 25 Mar 2022 11:12:11 -0300 Subject: [PATCH 1/2] Update connectionsID to receive \Aws\Result update SubscriptionRepository method getConnectionIdsForChannel() to accepts return of type \Aws\Result.. It's the cause of open issues and in my personal project. --- src/SubscriptionRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SubscriptionRepository.php b/src/SubscriptionRepository.php index f80481f..5001477 100644 --- a/src/SubscriptionRepository.php +++ b/src/SubscriptionRepository.php @@ -36,7 +36,7 @@ public function getConnectionIdsForChannel(string ...$channels): Collection $responses = Utils::all($promises)->wait(); return collect($responses) - ->flatmap(fn (array $result): array => $result['Items']) + ->flatmap(fn (array | \Aws\Result $result): array => $result['Items']) ->map(fn (array $item): string => $item['connectionId']['S']) ->unique(); } From 52157425bef6e5a758755c13ecbc34070bb93890 Mon Sep 17 00:00:00 2001 From: NairanOmura Date: Fri, 25 Mar 2022 14:43:04 -0300 Subject: [PATCH 2/2] Update SubscriptionRepository.php --- src/SubscriptionRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SubscriptionRepository.php b/src/SubscriptionRepository.php index 5001477..6246cae 100644 --- a/src/SubscriptionRepository.php +++ b/src/SubscriptionRepository.php @@ -36,7 +36,7 @@ public function getConnectionIdsForChannel(string ...$channels): Collection $responses = Utils::all($promises)->wait(); return collect($responses) - ->flatmap(fn (array | \Aws\Result $result): array => $result['Items']) + ->flatmap(fn (\Aws\Result $result): array => $result['Items']) ->map(fn (array $item): string => $item['connectionId']['S']) ->unique(); }