Closed justinbeaty closed 1 year ago
I also just re-read Flyingmana's comment in #1705 where it would be best to not involve composer in fixing this, likely because there are still many non-composer users. I think the best fix then is probably updating this repo's version of Cm_Cache_Backend_Redis
to work with the latest Credis, and also updating lib/Credis
to the latest as well. That way, if one did install Credis via composer (via Cm_Cache_Backend_Redis
), then there is no incompatibility. But we would have to wonder if any 3rd party modules rely on the old Credis lib, and updating it would break those modules? I don't have a really good answer yet to all of this so I'm interested to hear other opinions.
related to https://github.com/OpenMage/magento-lts/issues/524 So updating our code, and marking the CM_Redis repository as included in our composer.json may be the easiest.
@Flyingmana I think that can work. We should target 20.x with the updated lib/Credis, since there is the breaking change in the Credis lib. I do not know if other modules may have used Credis directly as well.
I am still not too sure in what case someone would use the Cm_RedisSession in this repo vs the external one. I was using the external one for a while until I decided to use the built in one. Does the external one just have different features?
This should be fixed with v19.5.0-rc1 and v20.1.0-rc1
Preconditions (*)
colinmollenhour/cache-backend-redis
installed, and using the version ofCm_RedisSession
in this repo.Steps to reproduce (*)
Expected result (*)
Actual result (*)
colinmollenhour/cache-backend-redis
installed, credis was being loaded from vendor instead oflib/Credis
Discussion
Since #1254 is now merged, I think the more urgent issue is resolved. I've been running the patch from that PR for the past week, and things are okay. However, I am running as headless Magento, and only the admin session creates a redis session. It's possible there are other incompatibilities between the different versions of Credis, but I haven't run into any as far as I know.
Here's the possible different versions that could be installed as I understand it:
Cm_Cache_Backend_Redis
(through composer.json) is set to"*"
, so the latest.So this issue is more of a discussion on how small things like this should be prevented. Perhaps instead of
lib/Credis
, you would need to install Credis via composer, and the Cm_RedisSession in this repo is updated to support the latest version? Or maybe Cm_RedisSession is removed from this repo and we only should use from composer? Unfortunately, Magento 1.x comes from a time before when composer was popular, and we also have to support people who do not use composer. But, I don't think composer could even have solved this problem, except that it might just warn that you are trying to use two different versions.