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