Skip to content

Releases: sabre-io/xml

2.0.2

09 Jan 13:58
Compare
Choose a tag to compare
  • #161: Prevent infinite loop on empty xml elements

2.0.1

09 Oct 15:27
Compare
Choose a tag to compare
  • #149: Properly detect xml parse errors in parseCurrentElement() edge-cases

2.1.0

08 Feb 11:01
22e9666
Compare
Choose a tag to compare
  • #112: Added a mixedContent deserializer function, which might be useful if you're parsing HTML-like documents with elements that contain both text and other elements as siblings. (@staabm).

2.0.0

16 Nov 05:57
Compare
Choose a tag to compare
  • Now requires PHP 7.
  • Uses typehints everywhere.
  • Fixed some minor strict typing-related issues.
  • Removed workaround for PHP bug 64230.

1.5.0

09 Oct 22:59
Compare
Choose a tag to compare
  • Now requires PHP 5.5.
  • Using finally to always roll back the context stack when serializing.
  • #94: Fixed an infinite loop condition when reading some invalid XML
    documents.

1.4.2

09 Oct 22:58
Compare
Choose a tag to compare
  • The contextStack in the Reader object is now correctly rolled back in
    error conditions (@staabm).
  • repeatingElements deserializer now still parses if a bare element name
    without clark notation was given.
  • $elementMap in the Reader now also supports bare element names.
  • Service::expect() can now also work with bare element names.

1.4.1

12 Mar 22:29
Compare
Choose a tag to compare
  • Parsing clark-notation is now cached. This can speed up parsing large
    documents with lots of repeating elements a fair bit. (@icewind1991).

1.4.0

12 Mar 22:19
Compare
Choose a tag to compare
  • Any array thrown into the serializer with numeric keys is now simply
    traversed and each individual item is serialized. This fixes an issue
    related to serializing value objects with array children.
  • When serializing value objects, properties that have a null value or an
    empty array are now skipped. We believe this to be the saner default, but
    does constitute a BC break for those depending on this.
  • Serializing array properties in value objects was broken.

1.3.0

29 Dec 20:47
Compare
Choose a tag to compare
  • The Service class adds a new mapValueObject method which provides basic
    capabilities to map between ValueObjects and XML.
  • #61: You can now specify serializers for specific classes, allowing you
    separate the object you want to serialize from the serializer. This uses the
    $classMap property which is defined on both the Service and Writer.
  • It's now possible to pass an array of possible root elements to
    Sabre\Xml\Service::expect().
  • Moved some parsing logic to Reader::getDeserializerForElementName(),
    so people with more advanced use-cases can implement their own logic there.
  • #63: When serializing elements using arrays, the value key in the array is
    now optional.
  • #62: Added a keyValue deserializer function. This can be used instead of
    the Element\KeyValue class and is a lot more flexible. (@staabm)
  • Also added an enum deserializer function to replace
    Element\Elements.
  • Using an empty string for a namespace prefix now has the same effect as
    null.

1.2.0

29 Dec 20:46
Compare
Choose a tag to compare
  • #53: Added parseGetElements, a function like parseInnerTree, except
    that it always returns an array of elements, or an empty array.