Skip to content

2002.2.2 prevent using remoteSynchronizedCache for Magento version < 2.4.8 #824

@thomas-kl1

Description

@thomas-kl1

Related changes : 2002.2.1...2002.2.2#diff-e60c0ca81bbaba89efc24465ad13fdadd6aa81dd7c0d6474ccddfb1afef192cbR183

Preconditions

Deploy any version of Magento < 2.4.8

Steps to reproduce

  1. Configure the Redis Backend to: REDIS_BACKEND: '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache'
  2. Deploy instance on Cloud

Expected result

  1. Successful deployment

Actual result

  1. Deployment failure:

W:
W: Magento version '2.4.7.0-patch5' does not support Valkey backend model '\Ma
W: gento\Framework\Cache\Backend\RemoteSynchronizedCache'
W:
W:
W: In Cache.php line 191:
W:
W: Magento version '2.4.7.0-patch5' does not support Valkey backend model '\Ma
W: gento\Framework\Cache\Backend\RemoteSynchronizedCache'
W:
W:
W: run ...
W:

It is because

public const VALKEY_BACKEND_REMOTE_SYNCHRONIZED_CACHE = '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache';
    public const REDIS_BACKEND_REMOTE_SYNCHRONIZED_CACHE = '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache';

Shares the same value.
Because Valkey is tested with remote backend, an exception is thrown:

if (in_array($backend, $notAllowedValkeyBackend, true)
              && !$this->magentoVersion->isGreaterOrEqual('2.4.8')) {
                throw new StepException(
                    sprintf(
                        'Magento version \'%s\' does not support Valkey backend model \'%s\'',
                        $this->magentoVersion->getVersion(),
                        $backend
                    )
                );
            }

2002.2.1...2002.2.2#diff-e60c0ca81bbaba89efc24465ad13fdadd6aa81dd7c0d6474ccddfb1afef192cbR189

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions