From b51bbe051039003c8f1c200695d0711d3e61ec51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E7=A5=9E=E5=AE=97?= Date: Thu, 15 Aug 2019 09:55:41 +0800 Subject: [PATCH] Improved Client (#193) --- CHANGELOG.md | 4 ++++ src/AlibabaCloud.php | 2 +- src/Clients/Client.php | 6 +++++- tests/Feature/Request/RequestAsyncTest.php | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e4535ca..e05a5cfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 1.5.15 - 2019-08-14 +- Improved Client. + + ## 1.5.14 - 2019-07-25 - Improved Credential Filter. diff --git a/src/AlibabaCloud.php b/src/AlibabaCloud.php index 1f0f5823..8657eddb 100644 --- a/src/AlibabaCloud.php +++ b/src/AlibabaCloud.php @@ -30,7 +30,7 @@ class AlibabaCloud /** * Version of the Client */ - const VERSION = '1.5.14'; + const VERSION = '1.5.15'; /** * This static method can directly call the specific service. diff --git a/src/Clients/Client.php b/src/Clients/Client.php index ef9e1491..c8d22803 100644 --- a/src/Clients/Client.php +++ b/src/Clients/Client.php @@ -6,13 +6,17 @@ use AlibabaCloud\Client\Traits\HttpTrait; use AlibabaCloud\Client\Traits\RegionTrait; use AlibabaCloud\Client\Credentials\StsCredential; +use AlibabaCloud\Client\Signature\ShaHmac1Signature; use AlibabaCloud\Client\Signature\SignatureInterface; +use AlibabaCloud\Client\Signature\ShaHmac256Signature; +use AlibabaCloud\Client\Signature\BearerTokenSignature; use AlibabaCloud\Client\Credentials\AccessKeyCredential; use AlibabaCloud\Client\Credentials\CredentialsInterface; use AlibabaCloud\Client\Credentials\EcsRamRoleCredential; use AlibabaCloud\Client\Credentials\RamRoleArnCredential; use AlibabaCloud\Client\Credentials\RsaKeyPairCredential; use AlibabaCloud\Client\Credentials\BearerTokenCredential; +use AlibabaCloud\Client\Signature\ShaHmac256WithRsaSignature; /** * Custom Client. @@ -59,7 +63,7 @@ public function getCredential() } /** - * @return SignatureInterface + * @return SignatureInterface|BearerTokenSignature|ShaHmac1Signature|ShaHmac256Signature|ShaHmac256WithRsaSignature */ public function getSignature() { diff --git a/tests/Feature/Request/RequestAsyncTest.php b/tests/Feature/Request/RequestAsyncTest.php index 48756e9f..21c147a9 100644 --- a/tests/Feature/Request/RequestAsyncTest.php +++ b/tests/Feature/Request/RequestAsyncTest.php @@ -87,7 +87,7 @@ static function (ResponseInterface $res) { return $res; }, static function (RequestException $e) { - self::assertTrue(Stringy::create($e->getMessage())->contains('timed')); + self::assertTrue(Stringy::create($e->getMessage())->contains('cURL error')); } )->wait(); }