You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-\[SNSQS\] added possibility to send message attributes using snsqs transport [\#1195](https://github.com/php-enqueue/enqueue-dev/pull/1195) ([onatskyy](https://github.com/onatskyy))
9
+
- Add in missing arg [\#1194](https://github.com/php-enqueue/enqueue-dev/pull/1194) ([gdsmith](https://github.com/gdsmith))
10
+
-\#1190 add index on delivery\_id to prevent slow queries [\#1191](https://github.com/php-enqueue/enqueue-dev/pull/1191) ([commercewerft](https://github.com/commercewerft))
11
+
- Add setTopicArn methods to SnsContext and SnsQsContext [\#1189](https://github.com/php-enqueue/enqueue-dev/pull/1189) ([gdsmith](https://github.com/gdsmith))
Copy file name to clipboardExpand all lines: pkg/snsqs/SnsQsContext.php
+9-20Lines changed: 9 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -53,23 +53,15 @@ public function __construct($snsContext, $sqsContext)
53
53
} elseif (is_callable($snsContext)) {
54
54
$this->snsContextFactory = $snsContext;
55
55
} else {
56
-
thrownew \InvalidArgumentException(sprintf(
57
-
'The $snsContext argument must be either %s or callable that returns %s once called.',
58
-
SnsContext::class,
59
-
SnsContext::class
60
-
));
56
+
thrownew \InvalidArgumentException(sprintf('The $snsContext argument must be either %s or callable that returns %s once called.', SnsContext::class, SnsContext::class));
61
57
}
62
58
63
59
if ($sqsContextinstanceof SqsContext) {
64
60
$this->sqsContext = $sqsContext;
65
61
} elseif (is_callable($sqsContext)) {
66
62
$this->sqsContextFactory = $sqsContext;
67
63
} else {
68
-
thrownew \InvalidArgumentException(sprintf(
69
-
'The $sqsContext argument must be either %s or callable that returns %s once called.',
70
-
SqsContext::class,
71
-
SqsContext::class
72
-
));
64
+
thrownew \InvalidArgumentException(sprintf('The $sqsContext argument must be either %s or callable that returns %s once called.', SqsContext::class, SqsContext::class));
73
65
}
74
66
}
75
67
@@ -137,6 +129,11 @@ public function declareTopic(SnsQsTopic $topic): void
thrownew \LogicException(sprintf('The factory must return instance of %s. It returned %s', SnsContext::class, is_object($context) ? get_class($context) : gettype($context)));
189
182
}
190
183
191
184
$this->snsContext = $context;
@@ -199,11 +192,7 @@ private function getSqsContext(): SqsContext
thrownew \LogicException(sprintf('The factory must return instance of %s. It returned %s', SqsContext::class, is_object($context) ? get_class($context) : gettype($context)));
thrownewInvalidDestinationException(sprintf('The destination must be an instance of [%s|%s] but got %s.', SnsQsTopic::class, SnsQsQueue::class, is_object($destination) ? get_class($destination) : gettype($destination)));
59
55
}
60
56
61
57
if ($destinationinstanceof SnsQsTopic) {
@@ -64,6 +60,7 @@ public function send(Destination $destination, Message $message): void
0 commit comments