Skip to content

Commit d21b596

Browse files
authored
Merge pull request #54 from traderinteractive/ASEARCH-584
Upgrade Guzzlehttp from v6 to v7
2 parents 5a0e236 + be9a62e commit d21b596

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"ext-json": "*",
2727
"lib-curl": "~7.15",
2828
"fig/http-message-util": "^1.1",
29-
"guzzlehttp/guzzle": "^6.3",
29+
"guzzlehttp/guzzle": "^7.0",
3030
"psr/http-message": "^1.0",
3131
"psr/simple-cache": "^1.0",
3232
"subjective-php/psr-cache-helper": "^2.0",

src/GuzzleAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use TraderInteractive\Util;
77
use GuzzleHttp\Client as GuzzleClient;
88
use GuzzleHttp\ClientInterface as GuzzleClientInterface;
9-
use GuzzleHttp\Exception\RequestException;
9+
use GuzzleHttp\Exception\TransferException;
1010
use GuzzleHttp\Promise;
1111
use Psr\Http\Message\RequestInterface;
1212
use Psr\Http\Message\ResponseInterface;
@@ -127,7 +127,7 @@ private function fulfillPromises(array $promises, ArrayObject $exceptions) : arr
127127
function (ResponseInterface $response, $index) use ($results) {
128128
$results[$index] = $response;
129129
},
130-
function (RequestException $e, $index) use ($exceptions) {
130+
function (TransferException $e, $index) use ($exceptions) {
131131
$exceptions[$index] = $e;
132132
}
133133
)->wait();

src/ResponseSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function unserialize($data)
3333
$headers = $data['headers'];
3434
$body = $data['body'];
3535
if ($body !== '') {
36-
$body = Psr7\stream_for($body);
36+
$body = Psr7\Utils::streamFor($body);
3737
}
3838

3939
return new Psr7\Response($statusCode, $headers, $body);

tests/ResponseSerializerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function provideValidSerializationData() : array
5555
'response' => new Psr7\Response(
5656
StatusCodes::STATUS_OK,
5757
['Content-Type' => ['application/json']],
58-
Psr7\stream_for('{"success": true}')
58+
Psr7\Utils::streamFor('{"success": true}')
5959
),
6060
'data' => [
6161
'statusCode' => StatusCodes::STATUS_OK,

0 commit comments

Comments
 (0)