phpfastcache
phpfastcache copied to clipboard
adjust rediscluster constant options
Proposed changes
update constants which we're using for the RedisCluster option were removed: https://github.com/phpredis/phpredis/issues/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)
- [x] 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
Nice catch, thanks ! (I will make a new release by the end of week)
Can you run the tests locally and tell me if they work successfully ?
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.
Hi @mocxi can you fix the CI errors + add check of constant before using them to keep backward compatibility please ?
Thank you !