Skip to content

Commit 576c727

Browse files
committed
Define array format for metadata
1 parent 08d8618 commit 576c727

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/DoctrineDbalRdbmsEventFactory.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@
2222
*/
2323
public function createFromRow(array $row): RdbmsEvent
2424
{
25+
/** @var array<string, mixed> $metadata */
26+
$metadata = (array) json_decode($row['metadata'], true, flags: JSON_THROW_ON_ERROR);
27+
2528
return new RdbmsEvent(
2629
$row['eventId'],
2730
[],
2831
$row['eventName'],
2932
$row['payload'],
30-
(array) json_decode($row['metadata'], true, flags: JSON_THROW_ON_ERROR),
33+
$metadata,
3134
new DateTimeImmutable($row['appliedAt']),
3235
);
3336
}

0 commit comments

Comments
 (0)