MacFJA / php-redisearch

PHP Client for RediSearch
MIT License
67 stars 9 forks source link

Deprecation Warning #62

Open inpresif opened 1 year ago

inpresif commented 1 year ago
Deprecated: Return type of MacFJA\RediSearch\Redis\Response\PaginatedResponse::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/macfja/redisearch/src/Redis/Response/PaginatedResponse.php on line 69

Deprecated: Return type of MacFJA\RediSearch\Redis\Response\PaginatedResponse::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/macfja/redisearch/src/Redis/Response/PaginatedResponse.php on line 104

Deprecated: Return type of MacFJA\RediSearch\Redis\Response\PaginatedResponse::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/macfja/redisearch/src/Redis/Response/PaginatedResponse.php on line 113

Deprecated: Return type of MacFJA\RediSearch\Redis\Response\PaginatedResponse::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/macfja/redisearch/src/Redis/Response/PaginatedResponse.php on line 136

HTH.

MacFJA commented 1 year ago

Which version of PHP are you running ?

inpresif commented 1 year ago

PHP Version 8.1.12

inpresif commented 1 year ago

If I add this (as per the error message suggestion for PHP8 annotation), the errors go away... image

Disclaimer: this is my patchwork, no idea if this is how it's supposed to be.

EDIT: Actually, I did it differently for the other 3 warnings by setting the return type: image

jeitnier commented 1 year ago

Any update for this issue?

gspirov commented 1 year ago

Any update?