Error with Laravel, Algolia and Psr

I am getting this error on Laravel with Algolia Search Client
Declaration of Algolia\AlgoliaSearch\Http\Psr7\Uri::withScheme(string $scheme): Psr\Http\Message\UriInterface must be compatible with Psr\Http\Message\UriInterface::withScheme($scheme)

I have
“php”: “^8.1.10”,
“algolia/algoliasearch-client-php”: “^3.4.1”,
“guzzlehttp/guzzle”: “^7.4.5”,
“psr/http-message”: “^2.0”,