diff --git a/composer.json b/composer.json index be3de55..785f741 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "require": { "php": "^7.2|^8.0", - "guzzlehttp/guzzle": "~7.0", + "guzzlehttp/guzzle": "^7.8", "guzzlehttp/uri-template": "0.2.0" }, "require-dev": { diff --git a/src/Http/HapiClient.php b/src/Http/HapiClient.php index bc9746e..d071d93 100644 --- a/src/Http/HapiClient.php +++ b/src/Http/HapiClient.php @@ -200,9 +200,9 @@ public function refresh($resource) * Instantiates the HttpRequest depending on the * configuration from the given Request. * @param $request RequestInterface The Request configuration. - * @return The HTTP request. + * @return \GuzzleHttp\Psr7\Request HTTP request. */ - private function createHttpRequest(RequestInterface $request) + private function createHttpRequest(RequestInterface $request): \GuzzleHttp\Psr7\Request { // Handle authentication first if ($this->authenticationMethod) { @@ -241,7 +241,7 @@ private function createHttpRequest(RequestInterface $request) $request->getMethod(), $url, array_merge($headers, $headersToAdd), - $body ? \GuzzleHttp\Psr7\stream_for($body) : null + $body ? \GuzzleHttp\Psr7\Utils::streamFor($body) : null ); return $httpRequest;