Skip to content

Commit 8b05ee2

Browse files
authored
Merge pull request #491 from Eligioo/main
Replace deprecated rewind_body with Message::rewindBody
2 parents 1502a8b + e0a394b commit 8b05ee2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Picqer/Financials/Exact/Connection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ private function parseResponse(Response $response, $returnSingleIfPossible = tru
439439
return [];
440440
}
441441

442-
Psr7\rewind_body($response);
442+
Psr7\Message::rewindBody($response);
443443
$json = json_decode($response->getBody()->getContents(), true);
444444
if (false === is_array($json)) {
445445
throw new ApiException('Json decode failed. Got response: ' . $response->getBody()->getContents());
@@ -536,7 +536,7 @@ private function acquireAccessToken()
536536

537537
$response = $this->client()->post($this->getTokenUrl(), $body);
538538

539-
Psr7\rewind_body($response);
539+
Psr7\Message::rewindBody($response);
540540
$body = json_decode($response->getBody()->getContents(), true);
541541

542542
if (json_last_error() === JSON_ERROR_NONE) {
@@ -685,7 +685,7 @@ private function parseExceptionForErrorMessages(Exception $e)
685685

686686
$this->extractRateLimits($response);
687687

688-
Psr7\rewind_body($response);
688+
Psr7\Message::rewindBody($response);
689689
$responseBody = $response->getBody()->getContents();
690690
$decodedResponseBody = json_decode($responseBody, true);
691691

0 commit comments

Comments
 (0)