Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle non-array return values for RedisCluster#mget #75

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

boesing
Copy link
Member

@boesing boesing commented Jul 3, 2023

Q A
Bugfix yes

Description

As per https://github.com/phpredis/phpredis/blob/35a7cc094c6c264aa37738b074c4c54c4ca73b87/redis_cluster.stub.php#L621, the RedisCluster#mget method can return non-array values:

  • RedisCluster in case we are within multi mode
  • false in case there was an error which did not end up in an RedisClusterException

Fixes #74

@boesing boesing added the Bug Something isn't working label Jul 3, 2023
@boesing boesing added this to the 2.5.1 milestone Jul 3, 2023
@boesing boesing force-pushed the bugfix/redis-return-type-handling branch from 36d09e6 to 7574285 Compare July 3, 2023 11:55
@boesing
Copy link
Member Author

boesing commented Jul 3, 2023

I am unable to enforce an internal redis error so that false is not testable.
Unless some1 has a tipp for me, I just handle the return value as annotated rather than testing any use-case.

@boesing boesing force-pushed the bugfix/redis-return-type-handling branch from 7574285 to 9af1db5 Compare July 3, 2023 11:56
@boesing boesing force-pushed the bugfix/redis-return-type-handling branch from 9af1db5 to 5c07761 Compare July 3, 2023 12:00
@boesing boesing changed the base branch from 2.6.x to 2.5.x July 3, 2023 12:03
@boesing boesing changed the base branch from 2.5.x to 2.6.x September 13, 2023 20:12
@boesing boesing merged commit 3bf8d01 into laminas:2.6.x Sep 13, 2023
12 checks passed
@boesing boesing modified the milestones: 2.5.1, 2.6.0 Sep 13, 2023
@boesing boesing deleted the bugfix/redis-return-type-handling branch September 14, 2023 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mget within RedisCluster now also returns false
1 participant