Skip to content

Commit a925189

Browse files
authored
fix: Expand predis support to v3 (#37)
resolves #36
1 parent 9b1f284 commit a925189

File tree

6 files changed

+92
-48
lines changed

6 files changed

+92
-48
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Run CI
22
on:
33
push:
4-
branches: [ main, 'feat/**' ]
4+
branches: [main, "feat/**"]
55
paths-ignore:
6-
- '**.md' # Do not need to run CI for markdown changes.
6+
- "**.md" # Do not need to run CI for markdown changes.
77
pull_request:
8-
branches: [ main, 'feat/**' ]
8+
branches: [main, "feat/**"]
99
paths-ignore:
10-
- '**.md'
10+
- "**.md"
1111

1212
jobs:
1313
ci-build:
@@ -35,6 +35,10 @@ jobs:
3535
- php-version: 8.3
3636
use-lowest-dependencies: false
3737

38+
# 8.4 configurations
39+
- php-version: 8.4
40+
use-lowest-dependencies: false
41+
3842
steps:
3943
- uses: actions/checkout@v4
4044
with:

.psalm-baseline.xml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<files psalm-version="6.12.0@cf420941d061a57050b6c468ef2c778faf40aee2">
3+
<file src="src/LaunchDarkly/Impl/Integrations/RedisBigSegmentsStore.php">
4+
<ClassMustBeFinal>
5+
<code><![CDATA[RedisBigSegmentsStore]]></code>
6+
</ClassMustBeFinal>
7+
<MissingOverrideAttribute>
8+
<code><![CDATA[public function getMembership(string $contextHash): ?array]]></code>
9+
<code><![CDATA[public function getMetadata(): Types\BigSegmentsStoreMetadata]]></code>
10+
</MissingOverrideAttribute>
11+
<PossiblyUnusedProperty>
12+
<code><![CDATA[$options]]></code>
13+
</PossiblyUnusedProperty>
14+
<RiskyTruthyFalsyComparison>
15+
<code><![CDATA[empty($prefix)]]></code>
16+
</RiskyTruthyFalsyComparison>
17+
</file>
18+
<file src="src/LaunchDarkly/Impl/Integrations/RedisFeatureRequester.php">
19+
<ClassMustBeFinal>
20+
<code><![CDATA[RedisFeatureRequester]]></code>
21+
</ClassMustBeFinal>
22+
<MissingOverrideAttribute>
23+
<code><![CDATA[protected function readItemString(string $namespace, string $key): ?string]]></code>
24+
<code><![CDATA[protected function readItemStringList(string $namespace): ?array]]></code>
25+
</MissingOverrideAttribute>
26+
<RiskyTruthyFalsyComparison>
27+
<code><![CDATA[empty($prefix)]]></code>
28+
</RiskyTruthyFalsyComparison>
29+
</file>
30+
<file src="src/LaunchDarkly/Integrations/Redis.php">
31+
<ClassMustBeFinal>
32+
<code><![CDATA[Redis]]></code>
33+
</ClassMustBeFinal>
34+
<PossiblyUnusedMethod>
35+
<code><![CDATA[bigSegmentsStore]]></code>
36+
<code><![CDATA[featureRequester]]></code>
37+
</PossiblyUnusedMethod>
38+
</file>
39+
</files>

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ coverage: #! Run unit tests with test coverage
1616
.PHONY: lint
1717
lint: #! Run quality control tools (e.g. psalm)
1818
./vendor/bin/psalm --no-cache
19-
composer cs-check
19+
PHP_CS_FIXER_IGNORE_ENV=1 composer cs-check

composer.json

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
{
2-
"name": "launchdarkly/server-sdk-redis-predis",
3-
"description": "LaunchDarkly PHP SDK Redis integration using the predis package",
4-
"keywords": [
5-
"launchdarkly",
6-
"launchdarkly php"
7-
],
8-
"homepage": "https://github.com/launchdarkly/php-server-sdk-redis-predis",
9-
"license": "Apache-2.0",
10-
"authors": [
11-
{
12-
"name": "LaunchDarkly <[email protected]>",
13-
"homepage": "http://www.launchdarkly.com/"
14-
}
15-
],
16-
"require": {
17-
"php": ">=8.1",
18-
"predis/predis": ">=2.3.0 <3.0.0",
19-
"launchdarkly/server-sdk": ">=6.4.0 <7.0.0",
20-
"psr/log": "^3.0"
21-
},
22-
"require-dev": {
23-
"friendsofphp/php-cs-fixer": "^3.68",
24-
"phpunit/php-code-coverage": "^9",
25-
"phpunit/phpunit": "^9",
26-
"vimeo/psalm": "^5.26"
27-
},
28-
"autoload": {
29-
"psr-4": {
30-
"LaunchDarkly\\": "src/LaunchDarkly/"
31-
}
32-
},
33-
"autoload-dev": {
34-
"psr-4": {
35-
"LaunchDarkly\\Impl\\Integrations\\Tests\\": "tests/"
36-
}
37-
},
38-
"config": {
39-
"sort-packages": true
40-
},
41-
"scripts": {
42-
"cs-check": "vendor/bin/php-cs-fixer fix --diff --dry-run --verbose --config=.php-cs-fixer.php",
43-
"cs-fix": "vendor/bin/php-cs-fixer fix --diff --verbose --config=.php-cs-fixer.php"
2+
"name": "launchdarkly/server-sdk-redis-predis",
3+
"description": "LaunchDarkly PHP SDK Redis integration using the predis package",
4+
"keywords": [
5+
"launchdarkly",
6+
"launchdarkly php"
7+
],
8+
"homepage": "https://github.com/launchdarkly/php-server-sdk-redis-predis",
9+
"license": "Apache-2.0",
10+
"authors": [
11+
{
12+
"name": "LaunchDarkly <[email protected]>",
13+
"homepage": "http://www.launchdarkly.com/"
4414
}
15+
],
16+
"require": {
17+
"php": ">=8.1",
18+
"predis/predis": ">=2.3.0 <4.0.0",
19+
"launchdarkly/server-sdk": ">=6.4.0 <7.0.0",
20+
"psr/log": "^3.0"
21+
},
22+
"require-dev": {
23+
"friendsofphp/php-cs-fixer": "^3.68",
24+
"phpunit/php-code-coverage": "^9",
25+
"phpunit/phpunit": "^9",
26+
"vimeo/psalm": "^6.12"
27+
},
28+
"autoload": {
29+
"psr-4": {
30+
"LaunchDarkly\\": "src/LaunchDarkly/"
31+
}
32+
},
33+
"autoload-dev": {
34+
"psr-4": {
35+
"LaunchDarkly\\Impl\\Integrations\\Tests\\": "tests/"
36+
}
37+
},
38+
"config": {
39+
"sort-packages": true
40+
},
41+
"scripts": {
42+
"cs-check": "vendor/bin/php-cs-fixer fix --diff --dry-run --verbose --config=.php-cs-fixer.php",
43+
"cs-fix": "vendor/bin/php-cs-fixer fix --diff --verbose --config=.php-cs-fixer.php"
44+
}
4545
}

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
66
xmlns="https://getpsalm.org/schema/config"
77
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8+
errorBaseline=".psalm-baseline.xml"
89
>
910
<projectFiles>
1011
<directory name="src" />

tests/Impl/Integrations/RedisFeatureRequesterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
namespace LaunchDarkly\Impl\Integrations\Tests\Impl\Integrations;
66

7-
use LaunchDarkly\Integrations\Redis;
87
use LaunchDarkly\Impl\Model\FeatureFlag;
98
use LaunchDarkly\Impl\Model\Segment;
9+
use LaunchDarkly\Integrations\Redis;
1010
use LaunchDarkly\Subsystems\FeatureRequester;
1111
use PHPUnit\Framework\TestCase;
1212
use Predis\Client;

0 commit comments

Comments
 (0)