BedrockStreaming / RedisMock

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

Wrong signature for zadd #73

Closed magnetik closed 5 years ago

magnetik commented 6 years ago

Predis ClientInterface declares zadd as:

https://github.com/nrk/predis/blob/111d100ee389d624036b46b35ed0c9ac59c71313/src/ClientInterface.php#L116 * @method int zadd($key, array $membersAndScoresDictionary)

While RedisMock declares: https://github.com/M6Web/RedisMock/blob/f4c6f55497becb1c6f5d9593b2a74163e0281858/src/M6Web/Component/RedisMock/RedisMock.php#L931 public function zadd($key, $score, $member) {

Am I missing something?

Meroje commented 6 years ago

Redis 2.4 added the possibility to add multiple elements with a single call, this signature targets an earlier version. There may be other outdated signatures in there.

magnetik commented 6 years ago

I was sort of okay with the limitation of having one element by call, but the difference in signature makes it impossible to use the mock as a Predis client replacement, right?

I'll try to do a PR.

magnetik commented 5 years ago

@Meroje Can you take a look at the PR linked above (#80)?