shotstack / shotstack-sdk-php

PHP SDK for Shotstack, the cloud video editing API.
https://shotstack.io/product/sdk/php/
11 stars 5 forks source link

Call to undefined function GuzzleHttp\\Psr7\\build_query() #20

Closed MR-AMDEV closed 2 years ago

MR-AMDEV commented 2 years ago

When making an export, go the following error: Call to undefined function GuzzleHttp\Psr7\build_query()

i am using laravel 8 and using guzzle 7.4.1.

The resolution to this issue is to use the Query::build method instead of the old one. https://docs.aws.amazon.com/aws-sdk-php/v3/api/function-GuzzleHttp.Psr7.build_query.html

Need someone to take a look at the following file: Api\EndpointsApi.php file

jeffski commented 2 years ago

Thanks for reporting this issue. Right now the only work around is to downgrade Guzzle to an earlier version before build_query was deprecated. 7.0.1 was the last version we tested with but maybe newer, see this similar ticket: https://github.com/shotstack/shotstack-sdk-php/issues/7.

The problem lies upstream with the generator we use to generate the docs (https://github.com/OpenAPITools/openapi-generator) which is still using an older version of Guzzle.

Leave this with us and we can see how to upgrade manually or submit a PR to the upstream provider. We will also need to make sure we don;t break any existing installations.

jeffski commented 2 years ago

We have upgraded the library to PHP 7.3 and Guzzle 7.3 in this release: https://github.com/shotstack/shotstack-sdk-php/releases/tag/v0.1.6. It now uses Query::build so this version will now work with newer versions of Guzzle.