mohannadelemary/laravel-redis-connection-clients
A Laravel package that provides Redis connection client wrappers, making it easy to configure, resolve, and reuse multiple Redis connections across your application for cache, queues, sessions, and custom workloads. Simplifies connection setup and keeps Redis access consistent and organized in Larav...
client key in config/database.php, while every other connection keeps database.redis.client. This turns a big-bang phpredis ↔ predis swap into an incremental, connection-by-connection cutover — directly supporting decisions like "can we adopt the newer client extension for cache but keep queues on the proven one?"Redis::extend() for a single connection (TLS/proxy wrapper, instrumented client, cluster-specific handling). This release makes that a configuration decision rather than an application-code change.database.php globally.Redis::extend() client on one connection, and any environment where a global client setting is too coarse.Adopt when:
phpredis and predis and cannot do a flag-day cutover.Redis::extend() that should apply only to specific connections.database.redis.client change that would affect every connection — i.e., the blast radius matters to you.Look elsewhere or wait when:
client — e.g., per-connection serializer, prefix, timeouts, or persistence options. The scope here is narrow by design; confirm it covers only what you need.For executives: This is a small, low-risk enabler for infrastructure modernization. It lets us change Redis drivers per connection instead of all at once, which reduces cutover risk, downtime, and rollback cost during client or extension upgrades. The dependency is narrow in scope and configuration-only — no application logic changes. The trade-off is maturity: it's a first release, so we pin the version and treat it as a thin, replaceable layer rather than a strategic dependency.
For engineering: Configuration-only change — add a client key to a Redis connection or cluster in config/database.php and only that connection uses it; everything else continues to honor database.redis.client. Works with phpredis, predis, and any client registered via Redis::extend(). Requires Laravel 12/13 and PHP 8.3+. Caveats: v0.1.0 — verify against our Laravel/PHP versions, confirm our custom clients register cleanly, and be ready to vendor or fork if the package stalls. The implementation is small enough that in-housing remains a viable fallback if the dependency becomes a maintenance concern.
How can I help you explore Laravel packages today?