platformsh-client-php icon indicating copy to clipboard operation
platformsh-client-php copied to clipboard

Compile error - incompatible declaration of ApiResponseException::create() method

Open kmadejski opened this issue 4 years ago • 0 comments

When API throws an exception, there is an attempt to convert it to internal Platformsh\Client\Exception\ApiResponseException, unfortunately, its declaration is not compatible with Guzzles' one.

Exception:

In ApiResponseException.php line 36:
                                                                               
  Compile Error: Declaration of Platformsh\Client\Exception\ApiResponseExcept  
  ion::create(Psr\Http\Message\RequestInterface $request, ?Psr\Http\Message\R  
  esponseInterface $response = NULL, ?Exception $previous = NULL, array $ctx   
  = Array) must be compatible with GuzzleHttp\Exception\RequestException::cre  
  ate(Psr\Http\Message\RequestInterface $request, ?Psr\Http\Message\ResponseI  
  nterface $response = NULL, ?Throwable $previous = NULL, array $ctx = Array)  
  : GuzzleHttp\Exception\RequestException  

Packages versions:

guzzlehttp/guzzle                       7.1.1     Guzzle is a PHP HTTP client library
guzzlehttp/promises                     1.4.1     Guzzle promises library
guzzlehttp/psr7                         1.8.2     PSR-7 message implementation that also provides common utility methods
...
platformsh/client                       2.5.0     Platform.sh API client
platformsh/config-reader                2.4.0     Small helper to access Platform.sh environment variables
platformsh/oauth2                       0.0.2     Platform.sh OAuth2 client
platformsh/symfonyflex-bridge           2.7.1     Bridge library for running Symfony Flex on Platform.sh

PHP 7.4.23

kmadejski avatar Sep 22 '21 10:09 kmadejski