Skip to content

Commit c35f236

Browse files
committed
chore(CheckSum): normalize JSON encoding with UNESCAPED_SLASHES and UNESCAPED_UNICODE
1 parent e2fae1b commit c35f236

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ValueObjects/Checksum.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ public static function createFromAttributes(array $attributes): self
1818
return new self(
1919
hash(
2020
self::HASHING_ALGORITHM,
21-
(string) json_encode($attributes, JSON_PARTIAL_OUTPUT_ON_ERROR)
21+
json_encode(
22+
$attributes,
23+
JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR
24+
)
2225
)
2326
);
2427
}

0 commit comments

Comments
 (0)