Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Run CI
on:
push:
branches: [ main, 'feat/**' ]
branches: [main, "feat/**"]
paths-ignore:
- '**.md' # Do not need to run CI for markdown changes.
- "**.md" # Do not need to run CI for markdown changes.
pull_request:
branches: [ main, 'feat/**' ]
branches: [main, "feat/**"]
paths-ignore:
- '**.md'
- "**.md"

jobs:
ci-build:
Expand Down Expand Up @@ -35,6 +35,10 @@ jobs:
- php-version: 8.3
use-lowest-dependencies: false

# 8.4 configurations
- php-version: 8.4
use-lowest-dependencies: false

steps:
- uses: actions/checkout@v4
with:
Expand Down
39 changes: 39 additions & 0 deletions .psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="6.12.0@cf420941d061a57050b6c468ef2c778faf40aee2">
<file src="src/LaunchDarkly/Impl/Integrations/RedisBigSegmentsStore.php">
<ClassMustBeFinal>
<code><![CDATA[RedisBigSegmentsStore]]></code>
</ClassMustBeFinal>
<MissingOverrideAttribute>
<code><![CDATA[public function getMembership(string $contextHash): ?array]]></code>
<code><![CDATA[public function getMetadata(): Types\BigSegmentsStoreMetadata]]></code>
</MissingOverrideAttribute>
<PossiblyUnusedProperty>
<code><![CDATA[$options]]></code>
</PossiblyUnusedProperty>
<RiskyTruthyFalsyComparison>
<code><![CDATA[empty($prefix)]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/LaunchDarkly/Impl/Integrations/RedisFeatureRequester.php">
<ClassMustBeFinal>
<code><![CDATA[RedisFeatureRequester]]></code>
</ClassMustBeFinal>
<MissingOverrideAttribute>
<code><![CDATA[protected function readItemString(string $namespace, string $key): ?string]]></code>
<code><![CDATA[protected function readItemStringList(string $namespace): ?array]]></code>
</MissingOverrideAttribute>
<RiskyTruthyFalsyComparison>
<code><![CDATA[empty($prefix)]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/LaunchDarkly/Integrations/Redis.php">
<ClassMustBeFinal>
<code><![CDATA[Redis]]></code>
</ClassMustBeFinal>
<PossiblyUnusedMethod>
<code><![CDATA[bigSegmentsStore]]></code>
<code><![CDATA[featureRequester]]></code>
</PossiblyUnusedMethod>
</file>
</files>
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ coverage: #! Run unit tests with test coverage
.PHONY: lint
lint: #! Run quality control tools (e.g. psalm)
./vendor/bin/psalm --no-cache
composer cs-check
PHP_CS_FIXER_IGNORE_ENV=1 composer cs-check
84 changes: 42 additions & 42 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
"name": "launchdarkly/server-sdk-redis-predis",
"description": "LaunchDarkly PHP SDK Redis integration using the predis package",
"keywords": [
"launchdarkly",
"launchdarkly php"
],
"homepage": "https://github.com/launchdarkly/php-server-sdk-redis-predis",
"license": "Apache-2.0",
"authors": [
{
"name": "LaunchDarkly <[email protected]>",
"homepage": "http://www.launchdarkly.com/"
}
],
"require": {
"php": ">=8.1",
"predis/predis": ">=2.3.0 <3.0.0",
"launchdarkly/server-sdk": ">=6.4.0 <7.0.0",
"psr/log": "^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.68",
"phpunit/php-code-coverage": "^9",
"phpunit/phpunit": "^9",
"vimeo/psalm": "^5.26"
},
"autoload": {
"psr-4": {
"LaunchDarkly\\": "src/LaunchDarkly/"
}
},
"autoload-dev": {
"psr-4": {
"LaunchDarkly\\Impl\\Integrations\\Tests\\": "tests/"
}
},
"config": {
"sort-packages": true
},
"scripts": {
"cs-check": "vendor/bin/php-cs-fixer fix --diff --dry-run --verbose --config=.php-cs-fixer.php",
"cs-fix": "vendor/bin/php-cs-fixer fix --diff --verbose --config=.php-cs-fixer.php"
"name": "launchdarkly/server-sdk-redis-predis",
"description": "LaunchDarkly PHP SDK Redis integration using the predis package",
"keywords": [
"launchdarkly",
"launchdarkly php"
],
"homepage": "https://github.com/launchdarkly/php-server-sdk-redis-predis",
"license": "Apache-2.0",
"authors": [
{
"name": "LaunchDarkly <[email protected]>",
"homepage": "http://www.launchdarkly.com/"
}
],
"require": {
"php": ">=8.1",
"predis/predis": ">=2.3.0 <4.0.0",
"launchdarkly/server-sdk": ">=6.4.0 <7.0.0",
"psr/log": "^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.68",
"phpunit/php-code-coverage": "^9",
"phpunit/phpunit": "^9",
"vimeo/psalm": "^6.12"
},
"autoload": {
"psr-4": {
"LaunchDarkly\\": "src/LaunchDarkly/"
}
},
"autoload-dev": {
"psr-4": {
"LaunchDarkly\\Impl\\Integrations\\Tests\\": "tests/"
}
},
"config": {
"sort-packages": true
},
"scripts": {
"cs-check": "vendor/bin/php-cs-fixer fix --diff --dry-run --verbose --config=.php-cs-fixer.php",
"cs-fix": "vendor/bin/php-cs-fixer fix --diff --verbose --config=.php-cs-fixer.php"
}
}
1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline=".psalm-baseline.xml"
>
<projectFiles>
<directory name="src" />
Expand Down
2 changes: 1 addition & 1 deletion tests/Impl/Integrations/RedisFeatureRequesterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace LaunchDarkly\Impl\Integrations\Tests\Impl\Integrations;

use LaunchDarkly\Integrations\Redis;
use LaunchDarkly\Impl\Model\FeatureFlag;
use LaunchDarkly\Impl\Model\Segment;
use LaunchDarkly\Integrations\Redis;
use LaunchDarkly\Subsystems\FeatureRequester;
use PHPUnit\Framework\TestCase;
use Predis\Client;
Expand Down