Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 6 and vessel error collision with the PHP Redis extension

I am using Laravel vessel to run my Laravel projects. I recently tried running a Laravel project with the new version 6, and I have encountered this error

LogicException

Please remove or rename the Redis facade alias in your "app" configuration file in order to avoid collision with the PHP Redis extension.

I took a bit to find out how to fix this issue, so I am leaving this question and an answer so other people who find this issue can hopefully fix it without so much struggle.

like image 886
Eli Avatar asked Sep 21 '19 18:09

Eli


1 Answers

The problem running the new Laravel version 6 on the docker vessel is that laravel has changed its default driver from predis to phpredis, this change is creating the error mentioned in the question.

To fix this issue you have to set the driver again to user predis instead of phpredis.

you can change your config/database.php to set predis as default

'client' => env('REDIS_CLIENT', 'predis'),

or change it in your .env file

REDIS_CLIENT=predis

As mention by other users. You could also install phpredis if that is an option that works for your project.

like image 106
Eli Avatar answered Oct 14 '22 03:10

Eli