New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[6.0] Redis Breaking Change not documented #29864
Comments
What's your |
The The steps from above are the steps which are nessacarry to trigger the problem. I didn't change anything else. |
I think in this case the problem is that php-redis isn't installed on your server. There isn't a breaking change. You're setting the driver to phpredis which uses the C extension It's indeed a problem that Forge doesn't installs this. I'll check in on this with @themsaid. |
The problem is that this change is not documented in the Upgrade Guide, there should be a notice about this change... |
@LKaemmerling but this isn't an issue with Laravel. The fact that the default was changed doesn't matter. The problem here is that you need the |
That's also documented in the introduction here: https://laravel.com/docs/6.0/redis#introduction |
We're looking into updating Forge for this to install ext-redis by default btw. |
Thanks Dries! This one definitely caught me too. I will look at a PR for the miscellaneous section of the upgrade guide calling it out. That is where it references if you want to keep your files in sync with laravel/laravel which is where this is coming from. |
There's nothing about this in the upgrade guide because no breaking was made. The default was changed in the skeleton so only new apps should have the new default (and thus need to install |
It was changed in the framework, too. https://github.com/laravel/framework/pull/29745/files#r317621260 If someone doesn't have a |
I experienced the same issue with an existing application: I'm using the Upon deployment this exception occured, which is quite misleading, because actually I shouldn't remove/rename the alias, but instead change the configuration value to |
I just can't understand how this is a breaking change. Look, in your previous laravel versions the default value of At newst versions the default value changed to |
@Arkanius The |
But that only happens if you update your config manually.
But you're saying it here: you changed the default. If you change a default value then things can't keep working as expected now can they? 😅 At this point I'm inclined to add a note about the upgrade guide about the change but there really isn't any breaking change. Feel free to send in a PR to the docs. |
@fitztrev that might indeed be a more noteworthy thing to add to the upgrade guide. Feel free to send in a PR. Otherwise I'll try to do so tomorrow. |
@driesvints 👍 See laravel/docs#5448. Edits welcome. |
@sebdesign that's exactly what happened to me as well. A notice in the upgrade guide really helps especially when at the bottom of the guide it says to use the Github comparison tool. I didn't think it would try to connect to the redis client without me using it, since I only use the redis client for cache and not a database. Maybe it also should only try to connect when the redis database connection is requested? |
This was added to the upgrade guide. |
|
I had no 'databse.redis.client' configured explicitely and after upgrade to Laravel 6 got tons of surprises because of it... |
I've seen this also, it happens if you have started with a Laravel version < 5.4.0, at which point the setting didn't existed, and upgraded over the years. Unless you manually synced the changes over from https://github.com/laravel/laravel or republish the configs, you're gonna miss out some of the changes over time. |
I too solved this issue by running The problem was once I changed and pushed my code with |
I can't seem to resolve this issue myself. I've setup a new site and removed predis and installed php-redis (note that |
@driesvints Installing in Forge provisioned servers by default? |
@gauravmak as of recently ext-redis is installed by default yeah. |
@newalphamedia try doing |
@kreitje thank you very much - that worked! For anyone else wanting to resolve this issue, you may try running these commands to on Homestead to get php-redis working:
That should be it! Worked for me. |
Also, for enabling it "the Debian way, you can use: |
laravel 6.4.0 is it ok? |
I had the same issue today when upgrading a 5.8.x app to 6.x. Followed the install guide at https://github.com/phpredis/phpredis/blob/develop/INSTALL.markdown as recommended by the docs, and verified When deploying we received:
This was fixed by running |
I think the problem is that https://laravel.com/docs/6.x/upgrade#redis-default-client makes some assumptions on the readers knowledge:
One has to know that |
Yep you're 100% correct. My previous comment was not 100% accurate I apologize. The docs actually just say |
Feel free to send in a pr to the docs if you feel that something can be clarified. |
Isn't this clear enough? laravel/docs#5388 |
No that documentation is incorrect. As per this issue the correct php-redis is |
@joelwmale that'll only work on unix based systems though |
Set |
Set REDIS_CLIENT=predis in .env file |
@LKaemmerling does there a way to force apt install php8.2-redis install the 5.3.7 version of phpredis instead of 6.0.0 ? |
Description:
With 39699b8 there was introduced a breaking change. This creaking change is not documented anywhere within the upgrade guide.
Steps To Reproduce:
I have prepared a repository containing the code to reproduce this behavior. There is also a thread where i wrote a little bit with @driesvints about this:
https://twitter.com/Lukas_Kae/status/1169314825006145536
The repository:
https://github.com/LKaemmerling/laravel-6-redis-bc
The text was updated successfully, but these errors were encountered: