Skip to content

Commit

Permalink
Merge pull request #3 from jarektkaczyk/guzzle-bump
Browse files Browse the repository at this point in the history
Update composer.json
  • Loading branch information
jarektkaczyk authored Dec 31, 2020
2 parents ca49b22 + 1a043fb commit f9c3a3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"require": {
"php": ">=7.4",
"ext-json": "*",
"guzzlehttp/guzzle": "^6.5",
"guzzlehttp/guzzle": "^7.0",
"psr/log": "^1.0"
},
"require-dev": {
Expand Down
4 changes: 2 additions & 2 deletions src/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Sofa\HttpClient;

use Exception;
use Throwable;
use GuzzleHttp\MessageFormatter;
use Psr\Http\Message\MessageInterface;
use Psr\Http\Message\RequestInterface;
Expand All @@ -27,7 +27,7 @@ class Formatter extends MessageFormatter
'text/html',
];

public function format(RequestInterface $request, ResponseInterface $response = null, Exception $error = null)
public function format(RequestInterface $request, ?ResponseInterface $response = null, ?Throwable $error = null): string
{
return preg_replace_callback_array([
preg_quote('/{\req_body}/') => $this->formatter($request),
Expand Down

0 comments on commit f9c3a3a

Please sign in to comment.