manticoresoftware / manticoresearch-php

Official PHP client for Manticore Search
MIT License
160 stars 32 forks source link

getDocumentByIds doees not work: "self" in callables is deprecated #170

Closed donhardman closed 2 months ago

donhardman commented 7 months ago

Method getDocumentByIds does not work in PHP 8.2 while getDocumentById works fine

Unhandled exception Exception with message "Use of "self" in callables is deprecated" in file "/src/app/core.php:360"

* #0 /src/app/core.php(230): App::error('Use of "self" i...')
* 
* #1 [internal function]: App::handleError(8192, 'Use of "self" i...', '/src/app/vendor...', 59)
* 
* #2 /src/app/vendor/manticoresoftware/manticoresearch-php/src/Manticoresearch/Index.php(59): array_walk(Array, 'self::checkDocu...')
* 
* #3 /src/app/src/lib/Manticore.php(268): Manticoresearch\Index->getDocumentByIds(Array)
* 
* #4 /src/app/src/component/Search.php(241): App\Lib\Manticore::getUsers(3266472141, 'user_id')
* 
* #5 /src/app/actions/search.php(122): App\Component\Search::getAuthors(Object(App\Model\Repo))
* 
* #6 /src/app/core.php(174): include('/src/app/action...')
* 
* #7 /src/app/core.php(179): App::{closure}()
* 
* #8 /src/app/main.php(7): App::process()
* 
* #9 {main}
donhardman commented 7 months ago

This should be fixed in https://github.com/manticoresoftware/manticoresearch-php/pull/172

sanikolaev commented 7 months ago

We need to update the readme correspondingly.

Nick-S-2018 commented 2 months ago

Done in https://github.com/manticoresoftware/manticoresearch-php/commit/9433630bbd7fc2234717f28898c3c10b597106e8