Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]"
"name": "Alex Whiteside",
"email": "[email protected]"
}
],
"keywords": [
Expand All @@ -17,13 +17,13 @@
"aws"
],
"require": {
"php": "^7.2",
"php": ">=7.4 <8.4",
"ext-json": "*",
"illuminate/broadcasting": "6.* || 7.*",
"illuminate/support": "6.* || 7.*",
"illuminate/contracts": "6.* || 7.*",
"illuminate/config": "6.* || 7.*",
"aws/aws-sdk-php": "^3.62"
"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": {
"sort-packages": true,
Expand Down
4 changes: 4 additions & 0 deletions src/LaravelSnsBroadcastProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public function getSnsClientConfig($config)
);
}

if(!empty($config['options']) && is_array($config['options'])) {
$snsConfig = array_merge($snsConfig, $config['options']);
}

return $snsConfig;
}
}
1 change: 1 addition & 0 deletions src/SnsBroadcaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
]);
}
Expand Down