Skip to content

Possibility for multiple Credis versions to conflict #1722

@justinbeaty

Description

@justinbeaty

Preconditions (*)

  1. OpenMage 20.12 (but I think it will be reproducible in any version)
  2. colinmollenhour/cache-backend-redis installed, and using the version of Cm_RedisSession in this repo.

Steps to reproduce (*)

  1. Install preconditions as noted above, before Fix undefined offset on redis session #1254 was merged, it was impossible to log in

Expected result (*)

  1. Log in in should work as normal

Actual result (*)

  1. With colinmollenhour/cache-backend-redis installed, credis was being loaded from vendor instead of lib/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:

  • The version in this repo has a copyright of 2011, so pretty old
  • The version (as a git submodule) in the external Cm_RedisSession is from about 4 years ago
  • The version required in 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions