Debian Codegraph @

vendor/wikimedia/json-codec/HISTORY.md

raw
1 # Release History
2
3 ## 4.0.0 (2025-08-04)
4 * Add `Hint::ONLY_FOR_DECODE` to support forward-compatibility of
5 serialized data.
6 * Drop support for PHP < 8.1.
7
8 ## 3.0.3 (2024-11-09)
9 * Make `Hint` a `Stringable` class for easier debugging.
10 * Improve `InvalidArgumentException` messages for easier debugging.
11
12 ## 3.0.2 (2024-07-22)
13 * Add generic template types to the `Hint` object.
14 * Fix behavior of `Hint::ALLOW_OBJECT` for non-empty lists.
15
16 ## 3.0.1 (2024-06-14)
17 * Refactor `JsonCodec::codecFor()` to be non-recursive. This simplifies
18 the implementation of extensions without worrying about recursive
19 calls to the subclass method.
20 * Gracefully handle embedded `stdClass` objects passed to
21 `::newFromJsonArray()`.
22
23 ## 3.0.0 (2024-06-12)
24 * Add new class hint mechanism to generalize the method added in 2.1.0
25 to augment hints. Class hints include:
26 * `Hint::LIST` to indicate an array of objects of the hinted class
27 * `Hint::STDCLASS` to indicate an `stdClass` object whose properties are
28 objects of the hinted class
29 * `Hint::USE_SQUARE` and `Hint::ALLOW_OBJECT` to customize encoding
30 of list-like objects.
31 * `Hint::INHERITED` to allow a superclass codec to handle instantiation of
32 its subclass objects.
33 * The signatures of any method accepting or returning a class hint have
34 been broadened to include the new `Hint` type. This is a breaking
35 change for methods where a hint was an argument.
36
37 ## 2.2.3 (2024-06-03)
38 * Ensure class aliases are resolved when looking up type hints and
39 class codecs (T353883).
40 * Update dev dependencies.
41
42 ## 2.2.2 (2023-11-17)
43 * Allow psr/container ^2.0.2 (as well as ^1.1.2)
44 * Export JsonCodec::TYPE_ANNOTATION to subclasses who might wish to
45 reassign where the type information is put.
46
47 ## 2.2.1 (2023-10-03)
48 * Allow symfony/polyfill-php81 ^1.27.0.
49
50 ## 2.2.0 (2023-10-03)
51 * Add additional protected methods to JsonCodec to allow subclasses to
52 further customize the encoding used.
53 * Allow objects to have numeric properties.
54 * Ensure objects with numeric properties are consistently encoded using
55 the '{...}' JSON syntax.
56
57 ## 2.1.0 (2023-10-02)
58 * Allow ::jsonClassHintFor() to return a class-string suffixed with
59 `[]` to indicate a list or homogeneous array of the given type.
60
61 ## 2.0.0 (2023-10-02)
62 * JsonCodec::addCodecFor() is added to provide the ability to
63 serialize/deserialize objects which don't implement JsonCodecable.
64
65 ## 1.0.0
66
67 * Initial release.