diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index cf0831da..1fcd4bc8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,13 +1,13 @@
name: Run CI
on:
push:
- branches: [ main ]
+ branches: [main]
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 ]
+ branches: [main]
paths-ignore:
- - '**.md'
+ - "**.md"
jobs:
linux-build:
@@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- php-version: [8.1, 8.2]
+ php-version: [8.1, 8.2, 8.3, 8.4]
use-lowest-dependencies: [true, false]
env:
@@ -43,8 +43,9 @@ jobs:
runs-on: windows-latest
strategy:
+ fail-fast: false
matrix:
- php-version: ['8.1', '8.2']
+ php-version: ["8.1", "8.2", "8.3", "8.4"]
env:
LD_INCLUDE_INTEGRATION_TESTS: 1
diff --git a/composer.json b/composer.json
index 836c9dfa..921f82b3 100644
--- a/composer.json
+++ b/composer.json
@@ -21,12 +21,12 @@
"ramsey/uuid": "^4.7"
},
"require-dev": {
- "friendsofphp/php-cs-fixer": "^3.15.0",
+ "friendsofphp/php-cs-fixer": "^3.80.0",
"guzzlehttp/guzzle": "^7",
"kevinrob/guzzle-cache-middleware": "^4.0",
"phpunit/php-code-coverage": "^9",
"phpunit/phpunit": "^9",
- "vimeo/psalm": "^5.15"
+ "vimeo/psalm": "^6.13.1"
},
"suggest": {
"guzzlehttp/guzzle": "(^6.3 | ^7) Required when using GuzzleEventPublisher or the default FeatureRequester",
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
new file mode 100644
index 00000000..bc3d379f
--- /dev/null
+++ b/psalm-baseline.xml
@@ -0,0 +1,613 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _errorKind]]>
+ _prerequisiteKey]]>
+ _ruleId]]>
+ _ruleIndex]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getDebugEventsUntilDate()]]>
+ getDebugEventsUntilDate()]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getWeight() / 100000.0]]>
+
+
+ getBucketBy()]]>
+ getContextKind()]]>
+
+
+
+
+
+
+
+ getWeight() / 100000.0]]>
+
+
+ isExperiment() ? null : $rollout->getBucketBy()]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getDebugEventsUntilDate()]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _send_events]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _error]]>
+
+
+
+ _attributes]]>
+ _error]]>
+ _multiContexts]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _kind]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _singleComponent]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/psalm.xml b/psalm.xml
index 4e9226bd..a7d49831 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -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"
>
diff --git a/src/LaunchDarkly/LDClient.php b/src/LaunchDarkly/LDClient.php
index 51749f9b..a6af990a 100644
--- a/src/LaunchDarkly/LDClient.php
+++ b/src/LaunchDarkly/LDClient.php
@@ -277,9 +277,7 @@ public function variationDetail(string $key, LDContext $context, mixed $defaultV
public function migrationVariation(string $key, LDContext $context, Stage $defaultStage): array
{
$result = $this->variationDetailInternal($key, $context, $defaultStage->value, $this->_eventFactoryDefault);
- /** @var EvaluationDetail $detail */
$detail = $result['detail'];
- /** @var ?FeatureFlag $flag */
$flag = $result['flag'];
$value = $detail->getValue();
diff --git a/src/LaunchDarkly/Migrations/Migrator.php b/src/LaunchDarkly/Migrations/Migrator.php
index fde06e97..08649636 100644
--- a/src/LaunchDarkly/Migrations/Migrator.php
+++ b/src/LaunchDarkly/Migrations/Migrator.php
@@ -37,9 +37,7 @@ public function read(
mixed $payload = null
): OperationResult {
$variationResult = $this->client->migrationVariation($key, $context, $defaultStage);
- /** @var Stage */
$stage = $variationResult['stage'];
- /** @var OpTracker */
$tracker = $variationResult['tracker'];
$tracker->operation(Operation::READ);
@@ -70,9 +68,7 @@ public function write(
mixed $payload = null
): WriteResult {
$variationResult = $this->client->migrationVariation($key, $context, $defaultStage);
- /** @var Stage */
$stage = $variationResult['stage'];
- /** @var OpTracker */
$tracker = $variationResult['tracker'];
$tracker->operation(Operation::WRITE);