diff --git a/composer.json b/composer.json index 5cc0fae..29ecc4b 100644 --- a/composer.json +++ b/composer.json @@ -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": { diff --git a/config/twilio-notification-channel.php b/config/twilio-notification-channel.php index 04e69c6..77a5e78 100644 --- a/config/twilio-notification-channel.php +++ b/config/twilio-notification-channel.php @@ -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'), diff --git a/src/TwilioConfig.php b/src/TwilioConfig.php index 5334258..ead51e2 100644 --- a/src/TwilioConfig.php +++ b/src/TwilioConfig.php @@ -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; diff --git a/src/TwilioProvider.php b/src/TwilioProvider.php index 19020ef..10ec91d 100755 --- a/src/TwilioProvider.php +++ b/src/TwilioProvider.php @@ -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();