hightman / xunsearch

免费开源的中文搜索引擎,采用 C/C++ 编写 (基于 xapian 和 scws),提供 PHP 的开发接口和丰富文档
http://www.xunsearch.com
Other
1.64k stars 391 forks source link

PHP 8.1 compatibility fixes for PHP SDK #129

Closed flyinghail closed 2 years ago

flyinghail commented 2 years ago

PHP SDK 在 PHP 8.1 下会产生 Deprecated 报错,参考:

wkingnet commented 1 year ago

没有修改完全,仍然出现报错

Fatal error: During inheritance of ArrayAccess: Uncaught [XSErrorException] ../../../../xs/sdk/php/lib/XS.php(718): Return type of XSDocument::offsetGet($name) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice(8192) in /xs/sdk/php/lib/XS.php on line 565
flyinghail commented 1 year ago

没有修改完全,仍然出现报错

Fatal error: During inheritance of ArrayAccess: Uncaught [XSErrorException] ../../../../xs/sdk/php/lib/XS.php(718): Return type of XSDocument::offsetGet($name) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice(8192) in /xs/sdk/php/lib/XS.php on line 565

已经修改: #140