From c4c0700bbe39c66f9d032cadd114aac84d36104d Mon Sep 17 00:00:00 2001 From: slepic Date: Tue, 17 Oct 2023 10:05:06 +0200 Subject: [PATCH] chore: replace guzzlehttp/promises deprecated functions (#2) --- src/ObservingMiddleware.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ObservingMiddleware.php b/src/ObservingMiddleware.php index 475c7b7..600d2a6 100644 --- a/src/ObservingMiddleware.php +++ b/src/ObservingMiddleware.php @@ -4,6 +4,7 @@ namespace Slepic\Guzzle\Http\ObservingMiddleware; use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Promise\Create; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Slepic\Http\Transfer\Observer\ObserverInterface; @@ -42,7 +43,7 @@ function (\Exception $exception) use ($request, $delegate) { ? $exception->getResponse() : null; $delegate->error($exception, $response); - return \GuzzleHttp\Promise\rejection_for($exception); + return Create::rejectionFor($exception); } ); };