From 1e817bdae77e90998e48d15d9ea1f03249d37fb3 Mon Sep 17 00:00:00 2001 From: Zing Date: Thu, 8 Dec 2022 22:28:59 +0800 Subject: [PATCH] Fix tests for new gateways (#258) * Fix tests for new gateways * Rector Rectify * Fix default config * Fix default config Co-authored-by: zingimmick --- .github/workflows/tests.yml | 4 ++++ config/sms.php | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 927f217..58079bd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,6 +37,10 @@ jobs: name: Require packages for PHP 8.1 run: composer require orchestra/testbench:^6.23 ramsey/collection:^1.2 --no-update + - if: matrix.php == '8.2' + name: Require packages for PHP 8.2 + run: composer require orchestra/testbench:^6.23 ramsey/collection:^1.2 nesbot/carbon:^2.62.1 --no-update + - name: Install dependencies uses: ramsey/composer-install@v2 with: diff --git a/config/sms.php b/config/sms.php index c25b230..d5b0cd8 100644 --- a/config/sms.php +++ b/config/sms.php @@ -125,6 +125,7 @@ 'driver' => Overtrue\EasySms\Gateways\QcloudGateway::class, 'secret_id' => env('SMS_QCOULD_SECRET_ID'), 'secret_key' => env('SMS_QCOULD_SECRET_KEY'), + 'region' => env('SMS_QCOULD_REGION', 'ap-guangzhou'), 'sdk_app_id' => env('SMS_QCOULD_SDK_APP_ID'), 'sign_name' => env('SMS_QCOULD_SIGN_NAME', ''), ], @@ -173,6 +174,12 @@ 'token' => env('SMS_TINIYO_TOKEN'), 'from' => env('SMS_TINIYO_FROM'), ], + 'tinree' => [ + 'driver' => \Overtrue\EasySms\Gateways\TinreeGateway::class, + 'accesskey' => env('SMS_TINREE_ACCESSKEY'), + 'secret' => env('SMS_TINREE_SECRET'), + 'sign' => env('SMS_TINREE_SIGN'), + ], 'twilio' => [ 'driver' => Overtrue\EasySms\Gateways\TwilioGateway::class, 'account_sid' => env('SMS_TWILIO_ACCOUNT_SID'), @@ -191,6 +198,15 @@ 'username' => env('SMS_UE35_USERNAME'), 'userpwd' => env('SMS_UE35_USERPWD'), ], + 'volcengine' => [ + 'driver' => \Overtrue\EasySms\Gateways\VolcengineGateway::class, + 'access_key_id' => env('SMS_VOLCENGINE_ACCESS_KEY_ID'), + 'access_key_secret' => env('SMS_VOLCENGINE_ACCESS_KEY_SECRET'), + 'region_id' => env('SMS_VOLCENGINE_REGION_ID', 'cn-north-1'), + 'sms_account' => env('SMS_VOLCENGINE_SMS_ACCOUNT'), + 'sign_name' => env('SMS_VOLCENGINE_SIGN_NAME'), + 'timeout' => env('SMS_VOLCENGINE_TIMEOUT', 5), + ], 'yuntongxun' => [ 'driver' => Overtrue\EasySms\Gateways\YuntongxunGateway::class, 'debug' => env('SMS_YUNTONGXUN_DEBUG'),