Skip to content

Commit

Permalink
chore: replace guzzlehttp/promises deprecated functions (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
slepic authored Oct 17, 2023
1 parent 0cd1aad commit c4c0700
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ObservingMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
);
};
Expand Down

0 comments on commit c4c0700

Please sign in to comment.