Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not assume that the sid sent to client is the account sid #135

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
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
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
}
],
"require": {
"php": ">=7.2|^8.0",
"php": ">=7.2|^8.0|^8.1",
"twilio/sdk": "~6.0",
"illuminate/notifications": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/support": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/events": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/queue": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
"illuminate/notifications": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0||^10.0|^11.0",
"illuminate/support": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0||^10.0|^11.0",
"illuminate/events": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0||^10.0|^11.0",
"illuminate/queue": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0||^10.0|^11.0"
},
"require-dev": {
"mockery/mockery": "^1.3",
"phpunit/phpunit": "^8.5|^9.5",
"orchestra/testbench": "^3|^4|^5|^6|^7"
"orchestra/testbench": "^3|^4|^5|^6|^7|^8|^9"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 1 addition & 0 deletions config/twilio-notification-channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
'password' => env('TWILIO_PASSWORD'), // optional when using auth token
'auth_token' => env('TWILIO_AUTH_TOKEN'), // optional when using username and password
'account_sid' => env('TWILIO_ACCOUNT_SID'),
'sid' => env('TWILIO_SID', env('TWILIO_ACCOUNT_SID')),

'from' => env('TWILIO_FROM'), // optional
'alphanumeric_sender' => env('TWILIO_ALPHA_SENDER'),
Expand Down
5 changes: 5 additions & 0 deletions src/TwilioConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public function getAccountSid(): ?string
return $this->config['account_sid'] ?? null;
}

public function getSid(): ?string
{
return $this->config['sid'] ?? null;
}

public function getFrom(): ?string
{
return $this->config['from'] ?? null;
Expand Down
2 changes: 1 addition & 1 deletion src/TwilioProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function register()
}

if ($config->usingTokenAuth()) {
return new TwilioService($config->getAccountSid(), $config->getAuthToken());
return new TwilioService($config->getSid(), $config->getAuthToken(), $config->getAccountSid());
}

throw InvalidConfigException::missingConfig();
Expand Down