launchdarkly/php-server-sdk

Cannot set a Redis connection via config on PHPRedisFeatureRequester

riekelt opened this issue · 0 comments

Describe the bug
I tried to set a Redis connection directly with

$redis = new Redis(...);

$options['feature_requester'] = PHPRedis::featureRequester([
     'redis_prefix' => 'launch_darkly',
     'phpredis_client' => $redis
]);

It sets the $this->_connection parameter in \LaunchDarkly\Impl\Integrations\PHPRedisFeatureRequester, but the class uses $this->_redisInstance.

To reproduce
Try setting a Redis connection directly on the PHPRedisFeatureRequester class with the configuration parameter phpredis_client

Expected behavior
It should set the Redis client on with the correct variable name.

SDK version
3.7.4

Language version, developer tools
PHP 7.4

OS/platform
MacOS, Linux