PHP 8.1 compatibility

Hi

I know PHP 8.1 is still RC, but one the implemented RFC’s is now causing the SDK to emmit deprecation notices, due to the enforcement of internal function/interface typing by the PHP core.

It looks mostly with the interface with JsonSerializable::jsonSerialize()

I have attached my output below.

Thanks

PHP Deprecated:  Return type of Couchbase\SearchOptions::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\BooleanFieldSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\BooleanSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\ConjunctionSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\DateRangeSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\DisjunctionSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\DocIdSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\GeoBoundingBoxSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\GeoDistanceSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\GeoPolygonSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\Coordinate::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\MatchAllSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\MatchNoneSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\MatchPhraseSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\MatchSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\NumericRangeSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\PhraseSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\PrefixSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\QueryStringSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\RegexpSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\TermSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\TermRangeSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\WildcardSearchQuery::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\TermSearchFacet::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\NumericRangeSearchFacet::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\DateRangeSearchFacet::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\SearchSortField::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\SearchSortGeoDistance::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\SearchSortId::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\SearchSortScore::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\SearchIndex::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
 PHP Deprecated:  Return type of Couchbase\DesignDocument::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0