Skip to content

Commit a150090

Browse files
authored
Merge pull request #332 from sil-org/update-silorg-deps
Release 8.0.1 -- Update sil-org dependencies
2 parents d58b2c7 + 0c24db5 commit a150090

File tree

8 files changed

+92
-199
lines changed

8 files changed

+92
-199
lines changed

application/common/components/Emailer.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
namespace common\components;
44

5-
use Sil\EmailService\Client\EmailServiceClient;
5+
use Sil\Idp\IdBroker\Client\EmailServiceClientException;
6+
use Sil\Idp\IdBroker\Client\IdBrokerClient;
67
use yii\base\Component;
78

89
class Emailer extends Component
@@ -14,7 +15,7 @@ class Emailer extends Component
1415
*/
1516
public $emailServiceConfig = [];
1617

17-
/** @var EmailServiceClient */
18+
/** @var IdBrokerClient */
1819
protected $emailServiceClient = null;
1920

2021
/**
@@ -43,7 +44,7 @@ protected function assertConfigIsValid()
4344
];
4445

4546
foreach ($requiredParams as $param) {
46-
if (! isset($this->emailServiceConfig[$param])) {
47+
if (!isset($this->emailServiceConfig[$param])) {
4748
throw new \InvalidArgumentException(
4849
'Missing email service configuration for ' . $param,
4950
1502311757
@@ -60,7 +61,7 @@ protected function assertConfigIsValid()
6061
* @param string $htmlBody The email body (as HTML).
6162
* @param string $textBody The email body (as plain text).
6263
* @param null|string $ccAddress The cc email address.
63-
* @throws \Sil\EmailService\Client\EmailServiceClientException
64+
* @throws EmailServiceClientException
6465
*/
6566
public function email(
6667
string $toAddress,
@@ -79,18 +80,18 @@ public function email(
7980
}
8081

8182
/**
82-
* @return EmailServiceClient
83-
* @throws \Sil\EmailService\Client\EmailServiceClientException
83+
* @return IdBrokerClient
84+
* @throws EmailServiceClientException
8485
*/
8586
protected function getEmailServiceClient()
8687
{
8788
if ($this->emailServiceClient === null) {
88-
$this->emailServiceClient = new EmailServiceClient(
89+
$this->emailServiceClient = new IdBrokerClient(
8990
$this->emailServiceConfig['baseUrl'],
9091
$this->emailServiceConfig['accessToken'],
9192
[
92-
EmailServiceClient::ASSERT_VALID_IP_CONFIG => $this->emailServiceConfig['assertValidIp'],
93-
EmailServiceClient::TRUSTED_IPS_CONFIG => $this->emailServiceConfig['validIpRanges'],
93+
IdBrokerClient::ASSERT_VALID_BROKER_IP_CONFIG => $this->emailServiceConfig['assertValidIp'],
94+
IdBrokerClient::TRUSTED_IPS_CONFIG => $this->emailServiceConfig['validIpRanges'],
9495
]
9596
);
9697
}

application/common/config/main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
'yii\web\HttpException:422',
146146
'yii\web\HttpException:429',
147147
'yii\web\HttpException:502',
148-
'Sil\EmailService\Client\EmailServiceClientException',
148+
'Sil\Idp\IdBroker\Client\EmailServiceClientException',
149149
],
150150
'logVars' => [], // Disable logging of _SERVER, _POST, etc.
151151
'message' => [

application/common/models/Verification.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace common\models;
44

55
use common\components\Emailer;
6-
use Sil\EmailService\Client\EmailServiceClient;
76
use yii\base\Model;
87
use yii\helpers\ArrayHelper;
98
use yii\web\ServerErrorHttpException;

application/composer.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "silinternational/idp-pw-api",
2+
"name": "sil-org/idp-pw-api",
33
"description": "Backend API for Identity Provider Password Management",
44
"minimum-stability": "stable",
55
"repositories": [
@@ -15,12 +15,10 @@
1515
"yiisoft/yii2": "~2.0.15",
1616
"yiisoft/yii2-swiftmailer": "*",
1717
"yiisoft/yii2-gii": "*",
18-
"silinternational/email-service-php-client": "^2.0",
19-
"silinternational/php-env": "^2.1.1 || ^3.0",
20-
"silinternational/yii2-json-log-targets": "^2.0",
21-
"silinternational/yii2-email-log-target": "^1.0.1",
22-
"silinternational/idp-id-broker-php-client": "^4.3.0",
23-
"silinternational/zxcvbn-api-client-php": "^2.0",
18+
"sil-org/php-env": "^2.1.1 || ^3.0",
19+
"sil-org/yii2-json-log-targets": "^2.0",
20+
"sil-org/idp-id-broker-php-client": "^4.3.0",
21+
"sil-org/zxcvbn-api-client-php": "^2.0",
2422
"simplesamlphp/saml2": "^4",
2523
"google/apiclient": "^2.0",
2624
"google/recaptcha": "^1.1.2",
@@ -29,7 +27,7 @@
2927
"codemix/yii2-streamlog": "^1.3",
3028
"codeception/module-phpbrowser": "^1.0||^2.0||^3.0",
3129
"friendsofphp/php-cs-fixer": "^3.0",
32-
"silinternational/yii2-sentry": "^2.0",
30+
"sil-org/yii2-sentry": "^2.0",
3331
"ext-pdo": "*"
3432
},
3533
"require-dev": {
@@ -41,7 +39,7 @@
4139
"codeception/verify": "0.*",
4240
"behat/behat": "^3.3",
4341
"phpunit/phpunit": "^9.0",
44-
"silinternational/yii2-codeception": "^1.1.0",
42+
"sil-org/yii2-codeception": "^1.1.0",
4543
"codeception/module-asserts": "^2.0",
4644
"codeception/module-yii2": "^1.1",
4745
"codeception/module-rest": "^3.0"

0 commit comments

Comments
 (0)