1ChangeLog 2========= 3 41.5.1 (2019-01-09) 5------------------ 6 7* #161: Prevent infinite loop on empty xml elements 8 9 101.5.0 (2016-10-09) 11------------------ 12 13* Now requires PHP 5.5. 14* Using `finally` to always roll back the context stack when serializing. 15* #94: Fixed an infinite loop condition when reading some invalid XML 16 documents. 17 18 191.4.2 (2016-05-19) 20------------------ 21 22* The `contextStack` in the Reader object is now correctly rolled back in 23 error conditions (@staabm). 24* repeatingElements deserializer now still parses if a bare element name 25 without clark notation was given. 26* `$elementMap` in the Reader now also supports bare element names. 27* `Service::expect()` can now also work with bare element names. 28 29 301.4.1 (2016-03-12) 31----------------- 32 33* Parsing clark-notation is now cached. This can speed up parsing large 34 documents with lots of repeating elements a fair bit. (@icewind1991). 35 36 371.4.0 (2016-02-14) 38------------------ 39 40* Any array thrown into the serializer with numeric keys is now simply 41 traversed and each individual item is serialized. This fixes an issue 42 related to serializing value objects with array children. 43* When serializing value objects, properties that have a null value or an 44 empty array are now skipped. We believe this to be the saner default, but 45 does constitute a BC break for those depending on this. 46* Serializing array properties in value objects was broken. 47 48 491.3.0 (2015-12-29) 50------------------ 51 52* The `Service` class adds a new `mapValueObject` method which provides basic 53 capabilities to map between ValueObjects and XML. 54* #61: You can now specify serializers for specific classes, allowing you 55 separate the object you want to serialize from the serializer. This uses the 56 `$classMap` property which is defined on both the `Service` and `Writer`. 57* It's now possible to pass an array of possible root elements to 58 `Sabre\Xml\Service::expect()`. 59* Moved some parsing logic to `Reader::getDeserializerForElementName()`, 60 so people with more advanced use-cases can implement their own logic there. 61* #63: When serializing elements using arrays, the `value` key in the array is 62 now optional. 63* #62: Added a `keyValue` deserializer function. This can be used instead of 64 the `Element\KeyValue` class and is a lot more flexible. (@staabm) 65* Also added an `enum` deserializer function to replace 66 `Element\Elements`. 67* Using an empty string for a namespace prefix now has the same effect as 68 `null`. 69 70 711.2.0 (2015-08-30) 72------------------ 73 74* #53: Added `parseGetElements`, a function like `parseInnerTree`, except 75 that it always returns an array of elements, or an empty array. 76 77 781.1.0 (2015-06-29) 79------------------ 80 81* #44, #45: Catching broken and invalid XML better and throwing 82 `Sabre\Xml\LibXMLException` whenever we encounter errors. (@stefanmajoor, 83 @DaanBiesterbos) 84 85 861.0.0 (2015-05-25) 87------------------ 88 89* No functional changes since 0.4.3. Marking it as 1.0.0 as a promise for 90 API stability. 91* Using php-cs-fixer for automated CS enforcement. 92 93 940.4.3 (2015-04-01) 95----------------- 96 97* Minor tweaks for the public release. 98 99 1000.4.2 (2015-03-20) 101------------------ 102 103* Removed `constants.php` again. They messed with PHPUnit and don't really 104 provide a great benefit. 105* #41: Correctly handle self-closing xml elements. 106 107 1080.4.1 (2015-03-19) 109------------------ 110 111* #40: An element with an empty namespace (xmlns="") is not allowed to have a 112 prefix. This is now fixed. 113 114 1150.4.0 (2015-03-18) 116------------------ 117 118* Added `Sabre\Xml\Service`. This is intended as a simple way to centrally 119 configure xml applications and easily parse/write things from there. #35, #38. 120* Renamed 'baseUri' to 'contextUri' everywhere. 121* #36: Added a few convenience constants to `lib/constants.php`. 122* `Sabre\Xml\Util::parseClarkNotation` is now in the `Sabre\Xml\Service` class. 123 124 1250.3.1 (2015-02-08) 126------------------ 127 128* Added `XmlDeserializable` to match `XmlSerializable`. 129 130 1310.3.0 (2015-02-06) 132------------------ 133 134* Added `$elementMap` argument to parseInnerTree, for quickly overriding 135 parsing rules within an element. 136 137 1380.2.2 (2015-02-05) 139------------------ 140 141* Now depends on sabre/uri 1.0. 142 143 1440.2.1 (2014-12-17) 145------------------ 146 147* LibXMLException now inherits from ParseException, so it's easy for users to 148 catch any exception thrown by the parser. 149 150 1510.2.0 (2014-12-05) 152------------------ 153 154* Major BC Break: method names for the Element interface have been renamed 155 from `serializeXml` and `deserializeXml` to `xmlSerialize` and 156 `xmlDeserialize`. This is so that it matches PHP's `JsonSerializable` 157 interface. 158* #25: Added `XmlSerializable` to allow people to write serializers without 159 having to implement a deserializer in the same class. 160* #26: Renamed the `Sabre\XML` namespace to `Sabre\Xml`. Due to composer magic 161 and the fact that PHP namespace are case-insensitive, this should not affect 162 anyone, unless you are doing exact string matches on class names. 163* #23: It's not possible to automatically extract or serialize Xml fragments 164 from documents using `Sabre\Xml\Element\XmlFragment`. 165 166 1670.1.0 (2014-11-24) 168------------------ 169 170* #16: Added ability to override `elementMap`, `namespaceMap` and `baseUri` for 171 a fragment of a document during reading an writing using `pushContext` and 172 `popContext`. 173* Removed: `Writer::$context` and `Reader::$context`. 174* #15: Added `Reader::$baseUri` to match `Writer::$baseUri`. 175* #20: Allow callbacks to be used instead of `Element` classes in the `Reader`. 176* #25: Added `readText` to quickly grab all text from a node and advance the 177 reader to the next node. 178* #15: Added `Sabre\XML\Element\Uri`. 179 180 1810.0.6 (2014-09-26) 182------------------ 183 184* Added: `CData` element. 185* #13: Better support for xml with no namespaces. (@kalmas) 186* Switched to PSR-4 directory structure. 187 188 1890.0.5 (2013-03-27) 190------------------ 191 192* Added: baseUri property to the Writer class. 193* Added: The writeElement method can now write complex elements. 194* Added: Throwing exception when invalid objects are written. 195 196 1970.0.4 (2013-03-14) 198------------------ 199 200* Fixed: The KeyValue parser was skipping over elements when there was no 201 whitespace between them. 202* Fixed: Clearing libxml errors after parsing. 203* Added: Support for CDATA. 204* Added: Context properties. 205 206 2070.0.3 (2013-02-22) 208------------------ 209 210* Changed: Reader::parse returns an array with 1 level less depth. 211* Added: A LibXMLException is now thrown if the XMLReader comes across an error. 212* Fixed: Both the Elements and KeyValue parsers had severe issues with 213 nesting. 214* Fixed: The reader now detects when the end of the document is hit before it 215 should (because we're still parsing an element). 216 217 2180.0.2 (2013-02-17) 219------------------ 220 221* Added: Elements parser. 222* Added: KeyValue parser. 223* Change: Reader::parseSubTree is now named parseInnerTree, and returns either 224 a string (in case of a text-node), or an array (in case there were child 225 elements). 226* Added: Reader::parseCurrentElement is now public. 227 228 2290.0.1 (2013-02-07) 230------------------ 231 232* First alpha release 233 234Project started: 2012-11-13. First experiments in June 2009. 235