jlevers / selling-partner-api

A PHP client library for Amazon's Selling Partner API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatibility with Guzzle Library Version 7.8.0 when using SP-API

Julian3004 opened this issue · comments

Upon updating to the latest version of the Guzzle library (7.8.0), the SP-API ceased to function correctly. When attempting to utilize the SP-API, I encounter the following error message:

Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in /.../inc/vendor/guzzlehttp/guzzle/src/HandlerStack.php:49
Stack trace:
#0 /.../inc/vendor/guzzlehttp/guzzle/src/Client.php(60): GuzzleHttp\HandlerStack::create()
#1 /.../inc/vendor/jlevers/selling-partner-api/lib/Authentication.php(61): GuzzleHttp\Client->__construct()
#2 /.../inc/vendor/jlevers/selling-partner-api/lib/Configuration.php(123): SellingPartnerApi\Authentication->__construct()
#3 /.../zusatzfunktionen/APIamazonProducts.php(8): SellingPartnerApi\Configuration->__construct()
#4 {main}

Steps to Reproduce:

Update the Guzzle library to version 7.8.0.
Install the SP-API as per the documentation.
Attempt to make an SP-API request

Expected Output:

The SP-API should function as anticipated, returning the respective response.

Actual Output:

An error occurs, indicating an undefined method in the Guzzle library.

Environment:

  • Guzzle library version: 7.8.0 (with error)
    

To resolve the issue, I downgraded the Guzzle library to version 7.7.1. After doing this, the SP-API is functioning correctly without any errors. It seems the issue is isolated to version 7.8.0.

@jlevers I hope a compatibility fix for version 7.8.0 can be implemented soon, as it would be beneficial to be able to use the latest version of the Guzzle library without encountering this error. In the meantime, I will continue using version 7.7.1 to maintain the functionality of my application.

This should be fixed in v6.