- How do I install laravel-redis-connection-clients?
- Install the package with Composer using composer require mohannadelemary/laravel-redis-connection-clients. It has no data migrations and is intended for Laravel applications that already configure Redis through config/database.php. After installation, confirm your Laravel and PHP versions meet the package requirements before changing any connection settings.
- Which Laravel and PHP versions are supported?
- The package explicitly supports Laravel 12 and 13 on PHP 8.3 or newer. Applications on older Laravel or PHP versions should treat it as unavailable unless they upgrade. Confirm these constraints across all target environments before adopting it.
- How do I set a different Redis client for one connection?
- Add a client key to the specific Redis connection or cluster in config/database.php. Keep the global database.redis.client unchanged if you only want that one connection to use a different client. The package is designed to affect only connections where you explicitly configure a client.
- Does this package replace Laravel's Redis configuration?
- No. It is a narrow configuration extension for Laravel's existing Redis layer, not a general Redis abstraction. It lets a connection override the global Redis client while preserving Laravel's normal config/database.php model. Use it only when you need per-connection client control.
- Can I use a custom Redis client registered with Redis::extend()?
- Yes, the package is designed for per-connection client keys, including custom clients registered through Redis::extend(). Ensure the custom client is registered before the Redis connection is resolved. Test the failure mode for an unregistered client in your own environment, since v0.1.0 documentation may not define every edge case.
- Does it support Redis cluster connections?
- The package documents support for setting a client key on individual Redis connections or clusters. If you use clusters, validate the chosen client against your cluster setup, especially when mixing phpredis, predis, or custom clients. Cluster-specific behavior can differ by client and should be tested directly.
- Does per-connection Redis client configuration work with config:cache and Octane?
- Because the feature is config-driven, it follows Laravel's normal configuration loading, but you should still test with php artisan config:cache enabled. Also test in Octane or other long-running worker environments before production rollout. This validation is especially important for an early-stage v0.1.0 package.
- Will it work with queues, Horizon, sessions, and cache stores?
- Queue, Horizon, session, and cache connections that reference your configured Redis connection should use that connection's client. Validate each workload independently because client behavior can vary and some components may implicitly depend on Redis client details. Pilot on a non-critical connection before using it for critical queues or sessions.
- Is it safe to use in production, and how do I roll back?
- Treat v0.1.0 as a targeted, low-blast-radius change but still pilot it on one non-critical connection first. Test with config caching, queue workers, and long-running workers before wider rollout. Rollback is simple: remove the client key from the affected connection so Laravel falls back to the global Redis client setting.
- What are the alternatives and maintenance considerations?
- The main alternative is Laravel's global database.redis.client setting or building your own Redis manager logic if you need broader abstraction. This package is best when you only need mixed clients per connection without replacing Laravel's Redis stack. Since it is v0.1.0, review the repository license, support policy, issue activity, and test coverage before relying on it long term.