Skip to content

Commit 6085253

Browse files
committed
Handle JSON_ERROR_NON_BACKED_ENUM
Handles new constant added since 8.1 (not currently documented in table but [exists here](https://www.php.net/manual/en/json.constants.php#constant.json-error-non-backed-enum)
1 parent 5af374c commit 6085253

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/JsonException.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class JsonException extends \InvalidArgumentException
2222
\JSON_ERROR_UNSUPPORTED_TYPE => 'A value of a type that cannot be encoded was given',
2323
\JSON_ERROR_INVALID_PROPERTY_NAME => 'A property name that cannot be encoded was given',
2424
\JSON_ERROR_UTF16 => 'Malformed UTF-16 characters, possibly incorrectly encoded',
25+
\JSON_ERROR_NON_BACKED_ENUM => 'Value contains a non-backed enum which cannot be serialized.',
2526
];
2627

2728
/**

0 commit comments

Comments
 (0)