-
-
Notifications
You must be signed in to change notification settings - Fork 993
Closed
Labels
Description
Describe the bug
Just after upgrading to predis v3.0.0 connection fails with:
Predis\Connection\ConnectionException
Failed: WRONGPASS invalid username-password pair or user is disabled. [tcp://127.0.0.1:6379]
at vendor/predis/predis/src/Connection/AbstractConnection.php:157
153▕ */
154▕ protected function onConnectionError($message, $code = 0): void
155▕ {
156▕ CommunicationException::handle(
➜ 157▕ new ConnectionException($this, "$message [{$this->getParameters()}]", $code)
158▕ );
159▕ }
160▕
161▕ /**
+28 vendor frames
29 artisan:35
Illuminate\Foundation\Console\Kernel::handle()To Reproduce
Steps to reproduce the behavior:
- Change
composer.jsonrequirements from"predis/predis": "^2.4"to"predis/predis": "^3.0"; - Run
composer update; - Run
artisan cache:clear; - See error above.
Expected behavior
artisan cache:clear finishing with message INFO Application cache cleared successfully. and no error.
Versions
- Laravel: 11.44.7
- Predis: 3.0.0
- PHP: 8.3.20
- Redis Server: 7.4+ (incl. 8)
- OS: Ubuntu 24.04.2 LTS
Code sample
N/A
Additional context
Laravel example for completion purposes. It happens just the same on a test app with predis being the single requirement. predis v2.4.0 works fine though.
-
.envcontains:CACHE_DRIVER=redis SESSION_DRIVER=redis REDIS_PASSWORD=secret
-
config/database.phpcontais:'redis' => [ 'client' => env('REDIS_CLIENT', 'predis'), 'options' => [ 'cluster' => env('REDIS_CLUSTER', 'redis'), 'prefix' => env( 'REDIS_PREFIX', Str::slug(env('APP_NAME','laravel'), '_').'_database_' ), 'scheme' => env('REDIS_SCHEME', 'unix'), ], 'default' => [ 'url' => env('REDIS_URL'), 'path' => env('REDIS_PATH', '/var/run/redis/redis-server.sock'), 'password' => env('REDIS_PASSWORD'), 'database' => env('REDIS_DB', 0), ], 'cache' => [ 'url' => env('REDIS_URL'), 'path' => env('REDIS_PATH', '/var/run/redis/redis-server.sock'), 'password' => env('REDIS_PASSWORD'), 'database' => env('REDIS_CACHE_DB', 1), ], ],