-
Notifications
You must be signed in to change notification settings - Fork 144
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
Adding support for RedisCluster (phpredis extension) #191
base: master
Are you sure you want to change the base?
Adding support for RedisCluster (phpredis extension) #191
Conversation
Thanks for the PR! I think this should probably just replace |
@JacobBrownAustin thank you for this! Magento has been missing support for redis 6 for 4 years. |
Those all sound great. I'll update this soon. |
@colinmollenhour , the Credis_Sentinel also uses Credis_Cluster. What should be done about that? https://github.com/colinmollenhour/credis/blob/master/Sentinel.php#L312 |
@colinmollenhour , because the new class is basically just an adapter to the php redis extension, there's not much logic to test in the class itself as a unit test, so I'll add a Redis cluster to the docker compose to test it more of an integration test. |
Both of those methods are marked as deprecated so they can be removed. The new version will get a major version bump already. |
Sounds good, thanks! |
@JacobBrownAustin any movement on this? |
@infowolfe |
* Credis_Cluster class now replaced with new class that uses RedisCluster. * Updated tests * Lots of tests skipped because of broken/missing features or incompatible behaviour because of Redis clusters or RedisCluster * Adding PHP 8.3 test container to run the phpunit tests
@colinmollenhour @infowolfe It now replaces the previously @deprecated Credis_Cluster class. I'm running the same tests as CredisTest, but I've had to skip 25 of them due to incompatibilities, known issues, and some bugs I've found with RedisCluster. A lot of them are due to the fact that some of the methods require an additional parameter to specify which node in the cluster to run on like flushDb and save. We could write adapters for this methods to get the most recent cluster information and then run the same command on all nodes of the cluster, like flushDb for example; but this is beyond the scope of my project as I'm not currently needing any of these methods. I've updated the documentation for this new class. And yeah, I added an Exception thrown in the constructor if the RedisCluster class from the 'redis' extension is missing. |
We can drop PHP 5.4, I think 7.4 should be the lowest to support. I'll try to take a closer look soon. @infowolfe if you have a chance to do some code review and test that would help a lot as well! |
related pull request:
colinmollenhour/php-redis-session-abstract#62