update lock clucknut
All checks were successful
All checks were successful
This commit is contained in:
25
vendor/twilio/sdk/src/Twilio/Base/BaseClient.php
vendored
25
vendor/twilio/sdk/src/Twilio/Base/BaseClient.php
vendored
@@ -67,6 +67,7 @@ public function __construct(
|
||||
$this->edge = $this->getArg(null, self::ENV_EDGE);
|
||||
$this->logLevel = $this->getArg(null, self::ENV_LOG);
|
||||
$this->userAgentExtensions = $userAgentExtensions ?: [];
|
||||
|
||||
$this->invalidateOAuth();
|
||||
$this->setAccountSid($accountSid ?: $this->username);
|
||||
|
||||
@@ -161,30 +162,6 @@ public function request(
|
||||
$authStrategy = $this->credentialProvider->toAuthStrategy();
|
||||
}
|
||||
|
||||
if( ($this->edge === null && $this->region !== null) || ($this->edge !== null && $this->region === null) )
|
||||
{
|
||||
trigger_error(' For regional processing, DNS is of format product.city.region.twilio.com; otherwise use product.twilio.com.', E_USER_DEPRECATED);
|
||||
}
|
||||
if ($this->edge === null && $this->region !== null) {
|
||||
$regionMap = [
|
||||
'au1' => 'sydney',
|
||||
'br1' => 'sao-paulo',
|
||||
'de1' => 'frankfurt',
|
||||
'ie1' => 'dublin',
|
||||
'jp1' => 'tokyo',
|
||||
'jp2' => 'osaka',
|
||||
'sg1' => 'singapore',
|
||||
'us1' => 'ashburn',
|
||||
'us2' => 'umatilla'
|
||||
];
|
||||
if (array_key_exists($this->region, $regionMap)) {
|
||||
trigger_error(' Setting default `Edge` for the provided `region`.', E_USER_DEPRECATED);
|
||||
$this->edge = $regionMap[$this->region];
|
||||
}
|
||||
if( $this->edge === null )
|
||||
$this->edge = '';
|
||||
}
|
||||
|
||||
if (!$authStrategy) {
|
||||
if (!$username) {
|
||||
throw new ConfigurationException('username is required');
|
||||
|
||||
Reference in New Issue
Block a user