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.
2
Answers
The problem running the new Laravel version 6 on the docker vessel is that laravel has changed its default driver from
predis
tophpredis
, 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 ofphpredis
.you can change your
config/database.php
to setpredis
as defaultor change it in your .env file
As mention by other users. You could also install
phpredis
if that is an option that works for your project.In my case I noticed php_redis extension was missing on system.
With installation of
php_redis
this error went away.If you are thinking of going back to
predis
, I won’t suggest that as predis is abandoned and Laravel is going to remove support for it in future