Skip to content

Commit 63c3815

Browse files
committed
fix: Move DEFAULT_PREFIX const to LaunchDarkly\Integrations
1 parent 3eedaa5 commit 63c3815

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/LaunchDarkly/Impl/Integrations/RedisFeatureRequester.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace LaunchDarkly\Impl\Integrations;
44

5+
use LaunchDarkly\Integrations;
56
use Predis\Client;
67
use Predis\ClientInterface;
78

@@ -11,15 +12,13 @@ class RedisFeatureRequester extends FeatureRequesterBase
1112
public ?array $_redisOptions = null;
1213
public ?string $_prefix;
1314

14-
const DEFAULT_PREFIX = 'launchdarkly';
15-
1615
public function __construct(string $baseUri, string $sdkKey, array $options)
1716
{
1817
parent::__construct($baseUri, $sdkKey, $options);
1918

2019
$this->_prefix = $options['redis_prefix'] ?? null;
2120
if ($this->_prefix === null || $this->_prefix === '') {
22-
$this->_prefix = self::DEFAULT_PREFIX;
21+
$this->_prefix = Integrations\Redis::DEFAULT_PREFIX;
2322
}
2423

2524
$client = $options['predis_client'] ?? null;

src/LaunchDarkly/Integrations/Redis.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
*/
1010
class Redis
1111
{
12+
const DEFAULT_PREFIX = 'launchdarkly';
13+
1214
/**
1315
* Configures an adapter for reading feature flag data from Redis.
1416
*

0 commit comments

Comments
 (0)