MacFJA / php-redisearch

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

Uncaught think\exception\ErrorException : attribute should be used to temporarily suppress the notice #66

Open ncard23 opened 8 months ago

ncard23 commented 8 months ago

hi after i do the demo,i found some bugs

During inheritance of Iterator: Uncaught think\exception\ErrorException: 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

image

my php version is 8.2.16

after i add #[\ReturnTypeWillChange] on the top of current() and other function in

macfja/redisearch/src/Redis/Response/PaginatedResponse.php

everything goes well

is there a plan to do some update ?

@MacFJA

ncard23 commented 8 months ago

I figure out the problem.

people who use php 8 should not use

composer require macfja/redisearch

because it is a stable version

after i run follow command

composer require macfja/redisearch:dev-main

everything go well,

it seems the stable version do not support php8 very well.

hope there is a update .