prometheus_client_php
prometheus_client_php copied to clipboard
Add Predis support
Hi I've introduced changes to support Predis as an alternative Redis connection adapter, while maintaining full backward compatibility and avoiding code duplication. This was achieved by introducing a minimal RedisClient interface, designed according to the YAGNI principle. It only exposes the necessary methods required by the prometheus adapter. AbstractRedis.php is basically all redis generic logic moved from Redis.php
I know there already is a PR with predis but it seems abandoned. I see there is still need to have support for predis, also I need one for my project. So I decided to make this one, and I’m ready to help bring it across the finish line 😄
All tests are passing locally, and the code style checks are green, so I hope there will be no issues in pipeline.