Brevo PHP SDK: "User Warning: Timeout option is not supported for the current PSR-18 client...

Setting a timeout on the Brevo PHP SDK v4 client with Guzzle installed emits: User Warning: Timeout option is not supported for the current PSR-18 client (GuzzleHttp\Client). Use Guzzle or Symfony HttpClient for timeout support. The cause is in src/Core/Client/RetryDecoratingClient.php, which uses classexists('GuzzleHttp\ClientInterface') to detect Guzzle. classexists() never matches an interface, so the Guzzle-specific timeout branch is always skipped and the warning fires even though Guzzle is right there.

This is a generator bug: classexists() was used where interfaceexists() was needed, so the SDK never detected Guzzle. The generator was fixed upstream and the corrected SDK shipped in 4.0.14, which is live on Packagist. Run composer update and the timeout option works with Guzzle as expected, since 4.0.14 satisfies the ^4.0 constraint. Confirmed by the Brevo team on the issue thread.

Source: https://github.com/getbrevo/brevo-php/issues/133

Source: https://github.com/getbrevo/brevo-php/issues/133