Skip to content

Releases: schmittjoh/serializer

1.7.0 release candidate

26 Apr 11:01
c2a4352
Compare
Choose a tag to compare
Pre-release

Highlights

This release contains a big set of improvements, especially when talking about:

  • consistency when dealing with arrays, hashes/maps (#728) and stdClass instances (#749, #730);
  • various fixes regarding Doctrine proxies (#750) and Doctrine objects instantiation (#751);
  • added some optimizations when using the serializer combined with Twig (#747)

Details

Implemented enhancements:

  • Allow to configure the doctrine object constructor #751 (goetas)
  • Trigger doctrine events on doctrine proxies #750 (goetas)
  • Added stdClass serialization handler #749 (goetas)
  • Allow to typehint for the type (array/hash) of the root item to be serialized #728 (goetas)

Fixed bugs:

  • Array gets serialized as object, not as array, depending on order. #709
  • Doctrine Proxies and serializer.pre_serialize #666
  • Fix stdClass inconsistencies when serializing to JSON #730 (goetas)
  • Allow to typehint for the type \(array/hash\) of the root item to be serialized #728 (goetas)

Closed issues:

  • Array serialized as JSON object #706
  • From old issue #290 #670
  • Form validation error response - field names not converted from camel case to underscore #587
  • Ability to getGroups on Context #554
  • SerializedName misleading usage and constructor issue #548
  • Discriminator should support xmlAttribute #547
  • Public method accessor is required for excluded/not exposed properties #519
  • Entity changed via preserialize and wrongly persisted #509
  • XML deserialization properties null when using default namespace #504
  • AccessorOrder is ignored #501
  • Deserialization of sub entites with non existing id #492
  • [Question] Handler/Converter for specific field #476
  • getClassName regex may incorrectly retrieve a false class name from comments above the class. #460
  • The sub-class "Proxy-Class" is not listed in the discriminator of the base class "DiscriminatorClass" #459
  • Multiple types for property? #445
  • Allow non-qualified XML serialization when XML namespaces are part of the metadata #413
  • Discriminator field name #412
  • Serializing to and deserializing from DateTime is inconsistent #394
  • ManyToOne and OneToMany Serialization Groups #387
  • Static SubscribingHandlerInterface::getSubscribingMethod #380
  • User defined ordering function #379
  • serialized_name for discriminator #372
  • Serializing object with empty array #350
  • VirtualProperty(s) are ignored with AccessorOrder #349
  • When setting a group of serialization, the inheritance doesn't work anymore #328
  • Serialization of empty object #323
  • "Can't pop from an empty datastructure" error when multiple serializer calls #319
  • virtual_properties cannot be excluded with groups #291
  • Integer serialized as String using VirtualProperty #289
  • SimpleObjectProxy is not implement abstract methods of Proxy class #287
  • Serializing array that have one of the element or member of an element an empty object #277
  • Serialization with groups return json object instead array #267
  • The purpose of "Force JSON output to "{}" instead of "[]" if it contains either no properties or all properties are null" #248
  • Json array serialisation #242
  • Ignoring "Assert" in output doc if excluded #241
  • Alphabetical accessor order doesn't respect SerializedName overrides #240
  • Request Annotation for Array Data #234
  • Allow @var instead of @type when deserializing #233
  • Strange issue with groups exclusion strategy #230
  • Warning when deserializing removed entity #216
  • Where in the JMS code does the navigator call VisitProperty method for visitor #207
  • Property of the type array is not in alphabetic order after serialization #196
  • Magic and inconsistencies in array serialization #191
  • PreSerialization Event not handled if the value is not object #162
  • Hierarchical object serialization does not appear to inherit metadata from ancestors for metadata defined in XML #151
  • When using MaxDepth, Serialization of an array entitiy is not working #132
  • Switch to change default naming strategy #128
  • Throw exceptions on invalid input #112
  • Recursion detected error when serialization groups are in use #96
  • Allow serialization groups to be accessible within event subscriber callbacks. #84
  • Allow Constructed Object to be Passed to Deserialize #79
  • JSON recursion when first object in root list is empty #61
  • Can't serialize an array with an empty object #59

Merged pull requests:

  • Added runtime twig extension support (significant performance improvements) #747 (goetas)

Fixed issues with expression virtual prop and exclude all policy

17 Apr 15:29
b8683d2
Compare
Choose a tag to compare

Fixed bugs:

  • @VirtualProperty "exp" does not play nice with @ExclusionPolicy("ALL") #746

Fixed XML edge-case when using max-depth exclusion strategy

12 Apr 14:30
2cf3b1a
Compare
Choose a tag to compare

Fixed bugs:

  • Do not output the XML node when the object will be emtpy #744 (goetas)

Closed issues:

  • XmlList not working since version 1.5.0 with xmlns attributes #742
  • DoctrineObjectConstructor: how to use it without Symfony, in a PHP project #741
  • Outdated docs site #733
  • Allow data access to Property naming strategy #717
  • Can't hint interface using @type to trigger custom handler #631
  • JSON/YAML encoding changes #617
  • Why do we need this check inside SerializedName constructor, if there is name? #558
  • Is it possible to deserialize Collection from Json #534
  • PhpCollection 0.4 #531
  • Possible mismatch of xml-attribute-map and $pMetadata->xmlAttribute in XmlDriver.php #422
  • Access level propose for Handler/DateHandler.php #386
  • Type DateTime and Timestamp (U format) #343

Expression language based virtual properties and other improvements

24 Mar 13:15
5e9008c
Compare
Choose a tag to compare

1.6.0 stable

Implemented enhancements:

  • Add DateTimeImmutable support to DateHandler #543

Fixed bugs:

  • Virtual property having type overriden by doctrine metadata #276

Closed issues:

  • Serialize a subclass #735
  • How to handle Doctrine not found entity ? #731
  • Regression with 1.5.0 => Undefined offset 15 #715
  • detect serialisation without groups set #546
  • Introducing the NormalizerInterface #537
  • How to set JSON serialization options? #535
  • @MaxDepth doesn't seem to be working #522
  • max_depth in YML config is ignored #498
  • Dynamic property type annotation #436
  • How to deserialize JSON if property might have a list of subobjects? #355
  • Object to array normalization #354
  • Serialize Doctrine object without references #353
  • Post_serialize doesn't serialize relation! #236
  • parsing string to date #217
  • Discriminator is not exposed when using a group exclusion strategy #157

Expression language based virtual properties and other improvements

14 Mar 11:18
3136137
Compare
Choose a tag to compare

The main feature that will be released with the 1.6.0 release is the "expression language based virtual properties" support.

For more info about expression language based virtual properties you can read this document.

Other things contained in the release candidate:

Implemented enhancements:

  • Expression language based virtual properties #708 (goetas)
  • check that cache directory was not created before throwing exception #729 (mente)
  • #720 - Adding support for DateInterval deserialization #721 (c0ntax)
  • Xml namespaces improvements #644 (goetas)

Fixed bugs:

  • Serialize correctly empty intervals according to ISO-8601 #722 (goetas)

Closed issues:

  • Add symfony expression in exclusions/expositions #406
  • Is it possible to achieve something like - shouldSerializeEmpty #725
  • How to handle DateTime serialization with fromArray method ? #723
  • DateInterval supported for serialization but not deserialization #720
  • Deserialization of collection when wraped by aditional xml tags #719
  • SerializedName based on a property value #716
  • Blank XML breaks XmlDeserializationVisitor error handling #701
  • Problem with FOSUserBundle ROLE serialization #690
  • Doctrine cache dependency when using setCacheDir #676
  • OneToOne entities are not deserialized if passing a nested one-to-one property #652
  • [RFC] Serialization refacotring #609
  • Object handler callback returns array, but serialized object = null #594
  • Cannot add @Discriminator field into specific @group #557
  • Object check on SerializationContext::isVisiting() #502
  • Define cdata and namespace for @xmllist elements #480
  • Serializer working with parent class #376
  • Add support for array format #374
  • Obtain VirtualProperty value using a service #359
  • make deserialisation of non existing id's configurable #333
  • HHVM compatibility issue with undefined property JMS\Serializer\Metadata\ClassMetadata::$inline #312
  • resources serialization #275
  • I'm receiving "Class ArrayCollection does not exist" when serializing (temporarily solved with a workaround) #274
  • Can't use handlers on strings (and other simple types) #194
  • composer.json update for doctrine #178
  • Use expression for virtual properties #171
  • Handle classes that implement collections (e.g. ArrayObject) and properties #137
  • Check CDATA is needed #136
  • property path support #22

Merged pull requests:

1.5.0 stable

14 Feb 14:43
9dc44f2
Compare
Choose a tag to compare

The main feature included in the 1.5.0 release is the expression language exclusion policy implemented with #673.

Here a more detailed changelog:

Implemented enhancements:

  • Implemented dynamic exclusion using symfony expression language #673 (goetas)
  • added support for xml-attributes as discriminators #692 (twtinteractive)
  • Prevent doctrine proxy loading for virtual types #684 (goetas)

Fixed bugs:

  • Deserializing XMLList with Namespaces not (always) working as intended #697 (goetas)

Merged pull requests:

  • Added doc reference for disabling discriminator #699 (dragosprotung)
  • Use GroupsExclusionStrategy::DEFAULT_GROUP instead default group. #694 (Aliance)
  • Improved Symfony 3.x compatibility #682 (goetas)

Closed issues:

  • Deserializing XMLList with Namespaces not (always) working as intended #695
  • Groups logic #693
  • BC from 1.1.* to ^1.2 #643
  • DoctrineProxySubscriber forces loading of the proxy even if custom handler exist #575
  • ConditionalExpose/Exclude annotation #540
  • Deprecated usage of ValidatorInterface #438
  • Missing addData in XmlSerializerVisitor makes it impossible to add data in serializer.post_serialize event #235
  • Support JSON PATCH for updating object graph #231
  • Dynamic expose, aka 'fields' query param #195

1.5.0-RC1 release candidate

19 Jan 15:07
Compare
Choose a tag to compare
Pre-release

The 1.5.0 release is going to be one of the most important releases till now for the 1.x series of the JMS serializer.

The main feature included in the 1.5.0 release is the expression language exclusion policy implemented with #673.

Here a more detailed changelog:

Implemented enhancements:

  • Implemented dynamic exclusion using symfony expression language #673 (goetas)
  • added support for xml-attributes as discriminators #692 (twtinteractive)
  • Prevent doctrine proxy loading for virtual types #684 (goetas)

Fixed bugs:

  • Deserializing XMLList with Namespaces not (always) working as intended #697 (goetas)

Merged pull requests:

  • Added doc reference for disabling discriminator #699 (dragosprotung)
  • Use GroupsExclusionStrategy::DEFAULT_GROUP instead default group. #694 (Aliance)
  • Improved Symfony 3.x compatibility #682 (goetas)

Closed issues:

  • Deserializing XMLList with Namespaces not (always) working as intended #695
  • Groups logic #693
  • BC from 1.1.* to ^1.2 #643
  • DoctrineProxySubscriber forces loading of the proxy even if custom handler exist #575
  • ConditionalExpose/Exclude annotation #540
  • Deprecated usage of ValidatorInterface #438
  • Missing addData in XmlSerializerVisitor makes it impossible to add data in serializer.post_serialize event #235
  • Support JSON PATCH for updating object graph #231
  • Dynamic expose, aka 'fields' query param #195

A stable 1.5.0 will be tagged in 3 weeks

2016-11-02

13 Nov 10:21
Compare
Choose a tag to compare

Fixed #674 introduced by #658

v1.4.1 (2016-11-02)

02 Nov 16:17
Compare
Choose a tag to compare

Fixed #668 that creates some issues with nelmio apidoc and in general when trying to use group based exclusion strategies without a properly initialized context

v1.4.0 (2016-10-31)

31 Oct 11:41
Compare
Choose a tag to compare
  • Xml setters ignored when deserializing #665 (goetas)
  • Document the implied 'Default' property group when no group is specified #661 (akoebbe)
  • Nullable array inconsistency #660 (goetas)
  • Allow discriminator map in the middle of the hierarchy when deserializing #659 (goetas)
  • Fixed PHP 7.0.11 BC break (or bugfix) #658 (goetas)
  • Handle both int and integer #657 (Aliance)
  • Renamed replaceData to setData #653 (goetas)
  • add required sqlite extension for developing #649 (scasei)
  • Run serialization benchmarks in the build process #647 (goetas)
  • Alcalyn feature default serializer context #645 (goetas)
  • Add format output option #640 (AyrtonRicardo)
  • Remove deprecated FileCacheReader for doctrine annotations #634 (goetas)
  • Added tests to ensure SerializeNull policy #633 (goetas)
  • Fix inheritance of discriminators on Doctrine entities #382 (xoob)
  • Allow Post Serialize Event to overwrite existing data #273 (jockri)