Skip to content

Commit 631f756

Browse files
committed
feat: Inline context for migration events
1 parent 491edd8 commit 631f756

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/LaunchDarkly/Migrations/OpTracker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function build(): array|string
140140
$event = [
141141
'kind' => 'migration_op',
142142
'creationDate' => Util::currentTimeUnixMillis(),
143-
'contextKeys' => $this->context->getKeys(),
143+
'context' => $this->context,
144144
'operation' => $this->operation->value,
145145
'evaluation' => [
146146
'key' => $this->key,

test-service/TestService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getStatus(): array
7676
'secure-mode-hash',
7777
'migrations',
7878
'event-sampling',
79-
'inline-context',
79+
'inline-context-all',
8080
'anonymous-redaction',
8181
'client-prereq-events',
8282
'big-segments'

tests/Migrations/OpTrackerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testCanBuildSuccessfully(): void
4747
$this->assertIsArray($result, 'tracker failed to build event');
4848
$this->assertEquals('migration_op', $result['kind']);
4949
$this->assertEquals('read', $result['operation']);
50-
$this->assertSame(['user' => 'user-key'], $result['contextKeys']);
50+
$this->assertEquals(LDContext::create('user-key'), $result['context']);
5151

5252
$evaluation = $result['evaluation'];
5353
$this->assertEquals('flag', $evaluation['key']);

0 commit comments

Comments
 (0)