Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kmadejski opened this issue Sep 22, 2021 · 0 comments

Comments

@kmadejski
Copy link

kmadejski commented Sep 22, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant