php-http/guzzle5-adapter

Respect PSR-18 with default adapter

dbu opened this issue · 0 comments

dbu commented

In the way we instantiate guzzle if no guzzle is supplied, i think we have the default behaviour of guzzle throwing an exception on http status 4xx/5xx, which was not correct for httplug and neither is correct for PSR-18.

$this->client = $client ?: new GuzzleClient();

vs

https://github.com/php-http/guzzle6-adapter/blob/c4e1a4f3205a188665ac3861f7fe33143f1af4ee/src/Client.php#L68-L74