Skip to content

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

Description

@kmadejski

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions