PHP SDK 4.2.1 with PHP 8.2

I am getting these errors:

ErrorException: 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 ./vendor/couchbase/couchbase/Couchbase/BooleanFieldSearchQuery.php:84

Warning: Uncaught Error: Object of class UnwindExit could not be converted to string in ./vendor/couchbase/couchbase/Couchbase/BooleanFieldSearchQuery.php:28

php -v
PHP 8.2.18 (cli) (built: Apr 9 2024 18:46:23) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.2.18, Copyright (c) Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
with Zend OPcache v8.2.18, Copyright (c), by Zend Technologies

php -i | grep couchbase


couchbase => enabled
couchbase_extension_version => 4.2.1
couchbase_extension_revision => 321e898b6a9e3bdabfc176d72940eb1a6ab47912
couchbase_client_revision => 1b506b0eb2d88725f943aa62527ff604610ba680
couchbase.log_level => no value => no value
couchbase.log_path => no value => no value
couchbase.log_php_log_err => 1 => 1
couchbase.log_stderr => 0 => 0
couchbase.max_persistent => -1 => -1
couchbase.persistent_timeout => -1 => -1

@avsej can you please help?

Am I doing something wrong? What can I investigate?

Hi @flaviu, sure. Could you post your search query?

I have created PR to fix signatures:

But I’m not sure about UnwindExit. Is it some class from your application?

This topic was automatically closed after 90 days. New replies are no longer allowed.