BedrockStreaming / RedisMock

A simple PHP Redis mock
http://tech.m6web.fr/redismock-qui-a-bouchonne-mon-redis.html
MIT License
81 stars 59 forks source link

HDEL - wrong arguments #89

Open xeops opened 5 years ago

xeops commented 5 years ago

array_key_exists(): The first argument should be either a string or an integer at m6web/redis-mock/src/M6Web/Component/RedisMock/RedisMock.php:756

vendor/predis/predis/src/ClientInterface.php:69

omansour commented 5 years ago

you probably called hdel with bad arguments. please check it

xeops commented 5 years ago

you probably called hdel with bad arguments. please check it

Sorry for bad English and describing a problem, but. When I call hdel like

$this->redis->hdel($key, [$field]);

i have an error

array_key_exists(): The first argument should be either a string or an integer at
m6web/redis-mock/src/M6Web/Component/RedisMock/RedisMock.php:756

But I cant send not array in hdel because in vendor/predis/predis/src/ClientInterface.php:69 @method int hdel($key, array $fields) accept only array as second variable.

omansour commented 5 years ago

I see. This library is so old. It needs to be updated with type hinting and other