Closed gilzow closed 2 years ago
OH, now I see what's happening. You're requiring guzzle as "guzzlehttp/guzzle": "^6.3 || ^7.0",
Between the 6.x branch of guzzle and the 7.x branch the method signature for GuzzleHttp\Exception\GuzzleException::create
changed. Something in php7.3 is causing composer to choose the 6.x branch of guzzle instead of the 7.x branch
I went back and test in a php7.3, and php7.2 and in neither of those did it switch to the 6.x version of guzzle. It wasn't until I tested in a php7.1 environment that it changed to v6.5.5 of guzzle because v7.x requires php7.2.5 or greater.
Not sure why the travis tests for php7.3 and php7.2 are switching to the 6.x version of guzzle
The ApiResponseException class doesn't make much sense, although the extra error details are useful especially for older Guzzle versions.
It says it "wraps" the Guzzle exceptions but it doesn't really, it returns an exception of the original class (so type hints have to be on Guzzle's RequestException or the GuzzleException interface, both of which are a bit messy in their own ways).
It looks like we have to stop overriding create()
and do something else, which seems like it won't break anything code-wise at least because the parent method will still be there.
Updates declaration of
ApiResourceBase::create
to match parentGuzzleHttp\Exception\GuzzleException::create