phpSmug
phpSmug copied to clipboard
Deprecated call to http_build_query
Please excuse my newbieness, it's my first issue report in GitHub. Basically, my code using phpSmug used to run without a hitch, but since I upgraded PHP to 8.3 (per company policy), I get this error for each call:
Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /vendor/guzzlehttp/guzzle/src/Client.php on line 445
I tried updating the Guzzle component manually but that made it worse.
Fatal error: Uncaught Error: Interface "Psr\Http\Client\ClientInterface" not found in /vendor/guzzlehttp/guzzle/src/Client.php:17
I'm out of my depth here: is it something you can help me with? Thanks.
On a related note, it'd be great if this library wasn't tied to Guzzle 6, upgrading to Guzzle 7 is one option but even better is to require the user to install an HttpClient that complies with one of the psr standards.
I prefer the Symfony HttpClient.
For example, here's how another package describes the installation where the http client isn't a dependency in the package itself.
https://github.com/meilisearch/meilisearch-php?tab=readme-ov-file#-installation
As a workaround, I lowered the error reporting level to E_ERROR | E_WARNING | E_PARSE
Guzzle and other dependencies has been updated in https://github.com/lildude/phpSmug/pull/93 which should address all of these.