Skip to content

Commit 09b9f18

Browse files
Fixed compatibility with guzzlehttp/psr7:^2.0 (#42)
* Fixed compatibility with `guzzlehttp/psr7:^2.0` * Specify supported versions
1 parent ee90911 commit 09b9f18

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"php": "^7.2",
3030
"ext-json": "*",
3131
"guzzlehttp/guzzle": "^6.1 || ^7.0.1",
32+
"guzzlehttp/psr7": "^1.7 || ^2.0",
3233
"psr/log": "^1.1"
3334
},
3435
"require-dev": {

src/Handler/MultiRecordArrayHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace GuzzleLogMiddleware\Handler;
66

7+
use GuzzleHttp\Psr7\Query;
78
use GuzzleHttp\TransferStats;
89
use GuzzleLogMiddleware\Handler\LogLevelStrategy\LogLevelStrategyInterface;
910
use Psr\Http\Message\MessageInterface;
@@ -148,7 +149,7 @@ private function formatBody(MessageInterface $message, array $options)
148149

149150
$isForm = preg_grep('/application\/x-www-form-urlencoded/', $contentType);
150151
if (!empty($isForm)) {
151-
$result = \GuzzleHttp\Psr7\parse_query($body);
152+
$result = Query::parse($body);
152153
$stream->rewind();
153154
return $result;
154155
}

0 commit comments

Comments
 (0)