diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45a4ae16..cf0831da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: strategy: matrix: - php-version: [8.1.26, 8.2.13] + php-version: ['8.1', '8.2'] env: LD_INCLUDE_INTEGRATION_TESTS: 1 @@ -54,15 +54,14 @@ jobs: with: fetch-depth: 0 # If you only need the current version keep this. + - name: Setup PHP + uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 + with: + php-version: ${{ matrix.php-version }} + - name: Install java support run: choco install -y javaruntime - - name: Install php support - run: choco install -y php --version=${{ matrix.php-version }} --force - - - name: Install composer - run: choco install -y composer - - name: Download wiremock run: Invoke-WebRequest -Uri https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-jre8-standalone/2.31.0/wiremock-jre8-standalone-2.31.0.jar -UseBasicParsing -OutFile wiremock.jar diff --git a/src/LaunchDarkly/Migrations/OpTracker.php b/src/LaunchDarkly/Migrations/OpTracker.php index d8e57883..6eb2a22d 100644 --- a/src/LaunchDarkly/Migrations/OpTracker.php +++ b/src/LaunchDarkly/Migrations/OpTracker.php @@ -140,7 +140,7 @@ public function build(): array|string $event = [ 'kind' => 'migration_op', 'creationDate' => Util::currentTimeUnixMillis(), - 'contextKeys' => $this->context->getKeys(), + 'context' => $this->context, 'operation' => $this->operation->value, 'evaluation' => [ 'key' => $this->key, diff --git a/test-service/TestService.php b/test-service/TestService.php index 8c82bf23..7b4cee7b 100644 --- a/test-service/TestService.php +++ b/test-service/TestService.php @@ -76,7 +76,7 @@ public function getStatus(): array 'secure-mode-hash', 'migrations', 'event-sampling', - 'inline-context', + 'inline-context-all', 'anonymous-redaction', 'client-prereq-events', 'big-segments' diff --git a/tests/Migrations/OpTrackerTest.php b/tests/Migrations/OpTrackerTest.php index 416ac5fd..c99ff188 100644 --- a/tests/Migrations/OpTrackerTest.php +++ b/tests/Migrations/OpTrackerTest.php @@ -47,7 +47,7 @@ public function testCanBuildSuccessfully(): void $this->assertIsArray($result, 'tracker failed to build event'); $this->assertEquals('migration_op', $result['kind']); $this->assertEquals('read', $result['operation']); - $this->assertSame(['user' => 'user-key'], $result['contextKeys']); + $this->assertEquals(LDContext::create('user-key'), $result['context']); $evaluation = $result['evaluation']; $this->assertEquals('flag', $evaluation['key']);