Skip to content

feat: Add Redis Sentinel support for Cache and Session handlers#10403

Closed
gr8man wants to merge 5 commits into
codeigniter4:developfrom
gr8man:Redis-Sentinel
Closed

feat: Add Redis Sentinel support for Cache and Session handlers#10403
gr8man wants to merge 5 commits into
codeigniter4:developfrom
gr8man:Redis-Sentinel

Conversation

@gr8man

@gr8man gr8man commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces support for Redis Sentinel in both Cache and Session handlers. It allows the framework to connect to a Redis Sentinel cluster to discover the current master node, enabling High Availability (HA) setups.

Key Changes:

  • Cache Handlers: Added Sentinel connection logic to both PredisHandler and RedisHandler.
  • Session Handler: Added Sentinel connection logic to RedisHandler in system/Session/Handlers/.
  • Configuration: Updated default app/Config/Cache.php and app/Config/Session.php with examples of how to configure Sentinel endpoints and names.
  • Workflows: Updated GitHub Actions (reusable-phpunit-test.yml and test-random-execution.yml) to include tests for the Redis Sentinel setup.
  • Tests: Added comprehensive test coverage for PredisHandlerTest, Cache/Handlers/RedisHandlerTest, and Session/Handlers/Database/RedisHandlerTest targeting Sentinel connections.
  • Code Style: Applied CS fixes and reformatted the newly added test code to ensure compliance with framework standards.

Checklists

  • Wrote unit tests for new features.
  • Code follows the framework's coding standards.
  • Required documentation (inline/config) added.

gr8man added 3 commits July 10, 2026 00:11
This squashes several fixes regarding Entity::toRawArray returning string values instead of Time objects, addressing issue codeigniter4#8302. It also updates DatetimeCast to handle string values to prevent DataConverter crashes, and applies phpstan, rector, and cs-fix formatting.
@github-actions github-actions Bot added the github_actions Pull requests that update Github_actions code label Jul 10, 2026
@gr8man gr8man closed this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update Github_actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant