From 03f131cfedf834413dc60cb73e6bef9ebc84fac6 Mon Sep 17 00:00:00 2001 From: Alex Whiteside Date: Fri, 4 Jun 2021 15:25:05 +1000 Subject: [PATCH 1/9] Allow Laravel 8 --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 9351d9b..d98e703 100644 --- a/composer.json +++ b/composer.json @@ -19,10 +19,10 @@ "require": { "php": "^7.2", "ext-json": "*", - "illuminate/broadcasting": "6.* || 7.*", - "illuminate/support": "6.* || 7.*", - "illuminate/contracts": "6.* || 7.*", - "illuminate/config": "6.* || 7.*", + "illuminate/broadcasting": "6.* || 7.* || 8.*", + "illuminate/support": "6.* || 7.* || 8.*", + "illuminate/contracts": "6.* || 7.* || 8.*", + "illuminate/config": "6.* || 7.* || 8.*", "aws/aws-sdk-php": "^3.62" }, "config": { From 6721b4dd3fa0b50b2b89841f4644534d0a4f2570 Mon Sep 17 00:00:00 2001 From: Alex Whiteside Date: Fri, 4 Jun 2021 16:03:19 +1000 Subject: [PATCH 2/9] Added event name as subject so broadcastAs works correctly --- src/SnsBroadcaster.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SnsBroadcaster.php b/src/SnsBroadcaster.php index 98c3884..bd12ab4 100644 --- a/src/SnsBroadcaster.php +++ b/src/SnsBroadcaster.php @@ -44,6 +44,7 @@ public function broadcast(array $channels, $event, array $payload = []) { $this->snsClient->publish([ 'TopicArn' => $this->topicName($channels), + 'Subject' => $event, 'Message' => json_encode(Arr::except($payload, 'socket')), ]); } From feb78f905ee8936fa084810620e1a0fca9ab4e4b Mon Sep 17 00:00:00 2001 From: Alex Whiteside Date: Fri, 4 Jun 2021 16:03:59 +1000 Subject: [PATCH 3/9] Added ability to set custom options for the SNS client --- src/LaravelSnsBroadcastProvider.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/LaravelSnsBroadcastProvider.php b/src/LaravelSnsBroadcastProvider.php index 7ee17c6..58e43a4 100644 --- a/src/LaravelSnsBroadcastProvider.php +++ b/src/LaravelSnsBroadcastProvider.php @@ -41,6 +41,10 @@ public function getSnsClientConfig($config) ); } + if(!empty($config['options']) && is_array($config['options'])) { + $snsConfig = array_merge($snsConfig, $config['options']); + } + return $snsConfig; } } From aaac17cc18b585de7194c9b994ddc2af20c7436d Mon Sep 17 00:00:00 2001 From: Alex Whiteside Date: Fri, 4 Jun 2021 16:08:41 +1000 Subject: [PATCH 4/9] Updated CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d00ae65..4f60076 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog + +## 1.1.0 +- Bumped Support for Laravel 8 +- Added ability to add any further options to `SNSClient` config (i.e. to override `endpoint`) +- *Breaking Change*: Inherited the name to the `Subject` field of an SNS Message. This either comes from `broadcastAs()` or the Class name ([see here](https://laravel.com/docs/8.x/broadcasting#broadcast-name) for more info). The last change is potentially breaking if one did not want the subject set. + ## 1.0.1 * Allow using IAM Role From fa874887a77c4256fb5100574555569255ff1439 Mon Sep 17 00:00:00 2001 From: Alex Whiteside <1505496+alexw23@users.noreply.github.com> Date: Thu, 2 May 2024 16:54:48 +1000 Subject: [PATCH 5/9] Updated dependencies --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index d98e703..ea54f3a 100644 --- a/composer.json +++ b/composer.json @@ -17,13 +17,13 @@ "aws" ], "require": { - "php": "^7.2", + "php": "^8.2", "ext-json": "*", - "illuminate/broadcasting": "6.* || 7.* || 8.*", - "illuminate/support": "6.* || 7.* || 8.*", - "illuminate/contracts": "6.* || 7.* || 8.*", - "illuminate/config": "6.* || 7.* || 8.*", - "aws/aws-sdk-php": "^3.62" + "illuminate/broadcasting": ">=6 <=11", + "illuminate/support": ">=6 <=11", + "illuminate/contracts": ">=6 <=11", + "illuminate/config": ">=6 <=11", + "aws/aws-sdk-php": "^3.305" }, "config": { "sort-packages": true, From d325300b88152436fd9710c553506875db90aef9 Mon Sep 17 00:00:00 2001 From: Alex Whiteside <1505496+alexw23@users.noreply.github.com> Date: Thu, 2 May 2024 17:16:11 +1000 Subject: [PATCH 6/9] Update composer.json --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index ea54f3a..935f0b9 100644 --- a/composer.json +++ b/composer.json @@ -1,13 +1,13 @@ { - "name": "maxgaurav/laravel-sns-broadcaster", + "name": "alexw23/laravel-sns-broadcaster", "description": "Sns Messages as queues using extended laravel sqs driver.", "type": "library", "license": "MIT", - "homepage": "https://github.com/maxgaurav/laravel-sns-broadcaster", + "homepage": "https://github.com/alexw23/laravel-sns-broadcaster", "authors": [ { - "name": "Max Gaurav", - "email": "max.gaurav@ithands.net" + "name": "Alex Whiteside", + "email": "alexwhiteside@ignitedlabs.com.au" } ], "keywords": [ From c50316e2186a1e0fa1e690efa705c352e965e8f5 Mon Sep 17 00:00:00 2001 From: Alex Whiteside <1505496+alexw23@users.noreply.github.com> Date: Thu, 2 May 2024 17:42:50 +1000 Subject: [PATCH 7/9] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 935f0b9..9f47c58 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "aws" ], "require": { - "php": "^8.2", + "php": ">=7.4 <=8.3", "ext-json": "*", "illuminate/broadcasting": ">=6 <=11", "illuminate/support": ">=6 <=11", From 9aa41b399cfb4b5192c02850dc9cb4844043b48e Mon Sep 17 00:00:00 2001 From: Alex Whiteside <1505496+alexw23@users.noreply.github.com> Date: Thu, 2 May 2024 17:44:27 +1000 Subject: [PATCH 8/9] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9f47c58..781ccbb 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "aws" ], "require": { - "php": ">=7.4 <=8.3", + "php": ">=7.4 <8.4", "ext-json": "*", "illuminate/broadcasting": ">=6 <=11", "illuminate/support": ">=6 <=11", From 7b278ccc66908c4b5762756e07f05e08f84c3e53 Mon Sep 17 00:00:00 2001 From: Alex Whiteside <1505496+alexw23@users.noreply.github.com> Date: Fri, 17 May 2024 14:11:40 +1000 Subject: [PATCH 9/9] Fix Laravel Versions --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 781ccbb..8635850 100644 --- a/composer.json +++ b/composer.json @@ -19,10 +19,10 @@ "require": { "php": ">=7.4 <8.4", "ext-json": "*", - "illuminate/broadcasting": ">=6 <=11", - "illuminate/support": ">=6 <=11", - "illuminate/contracts": ">=6 <=11", - "illuminate/config": ">=6 <=11", + "illuminate/broadcasting": "^8.0 || ^9.0 || ^10.0 || ^11.0", + "illuminate/support": "^8.0 || ^9.0 || ^10.0 || ^11.0", + "illuminate/contracts": "^8.0 || ^9.0 || ^10.0 || ^11.0", + "illuminate/config": "^8.0 || ^9.0 || ^10.0 || ^11.0", "aws/aws-sdk-php": "^3.305" }, "config": {