2012-04-26 20:28:35 +01:00
|
|
|
CHANGELOG
|
|
|
|
=========
|
|
|
|
|
2017-12-13 23:47:37 +00:00
|
|
|
4.1.0
|
|
|
|
-----
|
|
|
|
|
2018-04-27 13:29:13 +01:00
|
|
|
* added `CacheableSupportsMethodInterface` for normalizers and denormalizers that use
|
|
|
|
only the type and the format in their `supports*()` methods
|
2017-12-13 23:47:37 +00:00
|
|
|
* added `MissingConstructorArgumentsException` new exception for deserialization failure
|
|
|
|
of objects that needs data insertion in constructor
|
|
|
|
* added an optional `default_constructor_arguments` option of context to specify a default data in
|
|
|
|
case the object is not initializable by its constructor because of data missing
|
2017-10-10 14:00:30 +01:00
|
|
|
* added optional `bool $escapeFormulas = false` argument to `CsvEncoder::__construct`
|
2018-02-09 11:00:01 +00:00
|
|
|
* added `AbstractObjectNormalizer::setMaxDepthHandler` to set a handler to call when the configured
|
|
|
|
maximum depth is reached
|
2018-03-07 13:51:08 +00:00
|
|
|
* added optional `int[] $ignoredNodeTypes` argument to `XmlEncoder::__construct`. XML decoding now
|
|
|
|
ignores comment node types by default.
|
2017-03-24 16:17:33 +00:00
|
|
|
* added `ConstraintViolationListNormalizer`
|
2017-12-13 23:47:37 +00:00
|
|
|
|
2017-05-25 09:56:57 +01:00
|
|
|
4.0.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
* removed the `SerializerAwareEncoder` and `SerializerAwareNormalizer` classes,
|
|
|
|
use the `SerializerAwareTrait` instead
|
|
|
|
* removed the `Serializer::$normalizerCache` and `Serializer::$denormalizerCache`
|
|
|
|
properties
|
2017-05-18 07:41:42 +01:00
|
|
|
* added an optional `string $format = null` argument to `AbstractNormalizer::instantiateObject`
|
|
|
|
* added an optional `array $context = array()` to `Serializer::supportsNormalization`, `Serializer::supportsDenormalization`,
|
|
|
|
`Serializer::supportsEncoding` and `Serializer::supportsDecoding`
|
2017-05-25 09:56:57 +01:00
|
|
|
|
2017-07-05 10:12:59 +01:00
|
|
|
3.4.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
* added `AbstractObjectNormalizer::DISABLE_TYPE_ENFORCEMENT` context option
|
|
|
|
to disable throwing an `UnexpectedValueException` on a type mismatch
|
2017-08-01 16:22:43 +01:00
|
|
|
* added support for serializing `DateInterval` objects
|
2017-09-21 13:46:00 +01:00
|
|
|
* added getter for extra attributes in `ExtraAttributesException`
|
2017-09-19 10:55:20 +01:00
|
|
|
* improved `CsvEncoder` to handle variable nested structures
|
2017-03-24 16:17:33 +00:00
|
|
|
* CSV headers can be passed to the `CsvEncoder` via the `csv_headers` serialization context variable
|
2018-02-04 20:55:07 +00:00
|
|
|
* added `$context` when checking for encoding, decoding and normalizing in `Serializer`
|
2017-07-05 10:12:59 +01:00
|
|
|
|
2017-01-14 18:54:56 +00:00
|
|
|
3.3.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
* added `SerializerPass`
|
|
|
|
|
2016-01-29 15:26:46 +00:00
|
|
|
3.1.0
|
|
|
|
-----
|
|
|
|
|
2016-03-13 21:40:48 +00:00
|
|
|
* added support for serializing objects that implement `JsonSerializable`
|
|
|
|
* added the `DenormalizerAwareTrait` and `NormalizerAwareTrait` traits to
|
|
|
|
support normalizer/denormalizer awareness
|
|
|
|
* added the `DenormalizerAwareInterface` and `NormalizerAwareInterface`
|
|
|
|
interfaces to support normalizer/denormalizer awareness
|
|
|
|
* added a PSR-6 compatible adapter for caching metadata
|
|
|
|
* added a `MaxDepth` option to limit the depth of the object graph when
|
|
|
|
serializing objects
|
|
|
|
* added support for serializing `SplFileInfo` objects
|
|
|
|
* added support for serializing objects that implement `DateTimeInterface`
|
|
|
|
* added `AbstractObjectNormalizer` as a base class for normalizers that deal
|
|
|
|
with objects
|
2016-02-02 23:02:19 +00:00
|
|
|
* added support to relation deserialization
|
2016-01-29 15:26:46 +00:00
|
|
|
|
2015-02-02 22:11:58 +00:00
|
|
|
2.7.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
* added support for serialization and deserialization groups including
|
|
|
|
annotations, XML and YAML mapping.
|
|
|
|
* added `AbstractNormalizer` to factorise code and ease normalizers development
|
|
|
|
* added circular references handling for `PropertyNormalizer`
|
|
|
|
* added support for a context key called `object_to_populate` in `AbstractNormalizer`
|
|
|
|
to reuse existing objects in the deserialization process
|
|
|
|
* added `NameConverterInterface` and `CamelCaseToSnakeCaseNameConverter`
|
|
|
|
* [DEPRECATION] `GetSetMethodNormalizer::setCamelizedAttributes()` and
|
|
|
|
`PropertyNormalizer::setCamelizedAttributes()` are replaced by
|
|
|
|
`CamelCaseToSnakeCaseNameConverter`
|
2015-02-26 08:06:05 +00:00
|
|
|
* [DEPRECATION] the `Exception` interface has been renamed to `ExceptionInterface`
|
2015-01-04 13:47:41 +00:00
|
|
|
* added `ObjectNormalizer` leveraging the `PropertyAccess` component to normalize
|
|
|
|
objects containing both properties and getters / setters / issers / hassers methods.
|
2017-06-09 22:01:58 +01:00
|
|
|
* added `xml_type_cast_attributes` context option for allowing users to opt-out of typecasting
|
|
|
|
xml attributes.
|
2015-02-02 22:11:58 +00:00
|
|
|
|
2014-09-24 15:31:38 +01:00
|
|
|
2.6.0
|
2013-12-05 17:15:45 +00:00
|
|
|
-----
|
|
|
|
|
|
|
|
* added a new serializer: `PropertyNormalizer`. Like `GetSetMethodNormalizer`,
|
|
|
|
this normalizer will map an object's properties to an array.
|
2015-02-02 22:11:58 +00:00
|
|
|
* added circular references handling for `GetSetMethodNormalizer`
|
2013-12-05 17:15:45 +00:00
|
|
|
|
2014-02-22 23:56:53 +00:00
|
|
|
2.5.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
* added support for `is.*` getters in `GetSetMethodNormalizer`
|
|
|
|
|
2013-07-03 14:43:12 +01:00
|
|
|
2.4.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
* added `$context` support for XMLEncoder.
|
2013-11-23 09:35:55 +00:00
|
|
|
* [DEPRECATION] JsonEncode and JsonDecode where modified to throw
|
|
|
|
an exception if error found. No need for get*Error() functions
|
2013-07-03 14:43:12 +01:00
|
|
|
|
2013-03-23 09:10:35 +00:00
|
|
|
2.3.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
* added `GetSetMethodNormalizer::setCamelizedAttributes` to allow calling
|
|
|
|
camel cased methods for underscored properties
|
|
|
|
|
2013-01-18 23:06:48 +00:00
|
|
|
2.2.0
|
|
|
|
-----
|
|
|
|
|
2013-01-19 07:50:02 +00:00
|
|
|
* [BC BREAK] All Serializer, Normalizer and Encoder interfaces have been
|
|
|
|
modified to include an optional `$context` array parameter.
|
|
|
|
* The XML Root name can now be configured with the `xml_root_name`
|
|
|
|
parameter in the context option to the `XmlEncoder`.
|
|
|
|
* Options to `json_encode` and `json_decode` can be passed through
|
|
|
|
the context options of `JsonEncode` and `JsonDecode` encoder/decoders.
|
2013-01-18 23:06:48 +00:00
|
|
|
|
2012-04-26 20:28:35 +01:00
|
|
|
2.1.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
* added DecoderInterface::supportsDecoding(),
|
|
|
|
EncoderInterface::supportsEncoding()
|
|
|
|
* removed NormalizableInterface::denormalize(),
|
|
|
|
NormalizerInterface::denormalize(),
|
|
|
|
NormalizerInterface::supportsDenormalization()
|
|
|
|
* removed normalize() denormalize() encode() decode() supportsSerialization()
|
|
|
|
supportsDeserialization() supportsEncoding() supportsDecoding()
|
|
|
|
getEncoder() from SerializerInterface
|
|
|
|
* Serializer now implements NormalizerInterface, DenormalizerInterface,
|
|
|
|
EncoderInterface, DecoderInterface in addition to SerializerInterface
|
|
|
|
* added DenormalizableInterface and DenormalizerInterface
|
|
|
|
* [BC BREAK] changed `GetSetMethodNormalizer`'s key names from all lowercased
|
|
|
|
to camelCased (e.g. `mypropertyvalue` to `myPropertyValue`)
|
|
|
|
* [BC BREAK] convert the `item` XML tag to an array
|
|
|
|
|
|
|
|
``` xml
|
|
|
|
<?xml version="1.0"?>
|
|
|
|
<response>
|
|
|
|
<item><title><![CDATA[title1]]></title></item><item><title><![CDATA[title2]]></title></item>
|
|
|
|
</response>
|
|
|
|
```
|
|
|
|
|
|
|
|
Before:
|
|
|
|
|
|
|
|
Array()
|
|
|
|
|
|
|
|
After:
|
|
|
|
|
|
|
|
Array(
|
|
|
|
[item] => Array(
|
|
|
|
[0] => Array(
|
|
|
|
[title] => title1
|
|
|
|
)
|
|
|
|
[1] => Array(
|
|
|
|
[title] => title2
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|