Skip to content

Conversation

mocxi
Copy link

@mocxi mocxi commented Nov 14, 2024

Proposed changes

update constants which we're using for the RedisCluster option were removed: phpredis/phpredis#2262

Types of changes

What types of changes does your code introduce to Phpfastcache?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing code/behavior)
  • Deprecated third party dependency update
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation/Typo/Resource update that does not involve any code modification

Agreement

I have read the CONTRIBUTING and CODING GUIDELINE docs

Further comments

N/A

@Geolim4
Copy link
Member

Geolim4 commented Nov 27, 2024

Nice catch, thanks !
(I will make a new release by the end of week)

@Geolim4
Copy link
Member

Geolim4 commented Nov 27, 2024

Can you run the tests locally and tell me if they work successfully ?

@mocxi
Copy link
Author

mocxi commented Nov 28, 2024

Hello,
yes, it worked successfully at my local, here is my code:

 /**  * Check RedisCluster working  */ #[Group('skip')] #[Group('rawconfig')] public function testRawConfig() { $config = new \Phpfastcache\Drivers\Rediscluster\Config(); $config->addCluster('redis-node-creator:6379'); $cache = CacheManager::getInstance('RedisCluster', $config); $testString = 'xxx'; $cacheKey = sha1('test'); $cacheString = $cache->getItem($cacheKey)->set($testString); $cacheString->expiresAfter(5); $cache->save($cacheString); $value = $cache->getItem($cacheKey)->get(); $this->assertEquals($value, $testString); }

about the failed test above I see the error:

Rediscluster failed to connect with the following error message: "Couldn't map cluster keyspace using any provided seed" 

I guess the issue is that the RedisCluster server is not working properly.

@Geolim4
Copy link
Member

Geolim4 commented Mar 2, 2025

Hi @mocxi can you fix the CI errors + add check of constant before using them to keep backward compatibility please ?

Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants