1441 |
ariadna |
1 |
# Changelog
|
|
|
2 |
|
|
|
3 |
All notable changes to this project will be documented in this file.
|
|
|
4 |
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
5 |
|
|
|
6 |
## x.y.z
|
|
|
7 |
|
|
|
8 |
### Added
|
|
|
9 |
|
|
|
10 |
### Changed
|
|
|
11 |
|
|
|
12 |
### Deprecated
|
|
|
13 |
|
|
|
14 |
### Removed
|
|
|
15 |
|
|
|
16 |
### Fixed
|
|
|
17 |
|
|
|
18 |
## 8.7.0: Add support for PHP 8.4
|
|
|
19 |
|
|
|
20 |
### Added
|
|
|
21 |
|
|
|
22 |
- Add support for PHP 8.4 (#675, #701, #746, #751)
|
|
|
23 |
|
|
|
24 |
### Changed
|
|
|
25 |
|
|
|
26 |
- Mark parsing-internal classes and methods as `@internal` (#711)
|
|
|
27 |
- Block installations on unsupported higher PHP versions (#691)
|
|
|
28 |
|
|
|
29 |
### Deprecated
|
|
|
30 |
|
|
|
31 |
- Deprecate the expansion of shorthand properties (#719)
|
|
|
32 |
- Deprecate `Parser::setCharset()` and `Parser::getCharset()` (#703)
|
|
|
33 |
|
|
|
34 |
### Fixed
|
|
|
35 |
|
|
|
36 |
- Fix type errors in PHP strict mode (#695)
|
|
|
37 |
|
|
|
38 |
## 8.6.0
|
|
|
39 |
|
|
|
40 |
### Added
|
|
|
41 |
|
|
|
42 |
- Support arithmetic operators in CSS function arguments (#607)
|
|
|
43 |
- Add support for inserting an item in a CSS list (#545)
|
|
|
44 |
- Add support for the `dvh`, `lvh` and `svh` length units (#415)
|
|
|
45 |
|
|
|
46 |
### Changed
|
|
|
47 |
|
|
|
48 |
- Improve performance of Value::parseValue with many delimiters by refactoring
|
|
|
49 |
to remove `array_search()` (#413)
|
|
|
50 |
|
|
|
51 |
## 8.5.2
|
|
|
52 |
|
|
|
53 |
### Changed
|
|
|
54 |
|
|
|
55 |
- Mark all class constants as `@internal` (#500)
|
|
|
56 |
|
|
|
57 |
### Fixed
|
|
|
58 |
|
|
|
59 |
- Fix undefined local variable in `CalcFunction::parse()` (#593)
|
|
|
60 |
|
|
|
61 |
## 8.5.1
|
|
|
62 |
|
|
|
63 |
### Fixed
|
|
|
64 |
|
|
|
65 |
- Fix PHP notice caused by parsing invalid color values having less than
|
|
|
66 |
6 characters (#485)
|
|
|
67 |
- Fix (regression) failure to parse at-rules with strict parsing (#456)
|
|
|
68 |
|
|
|
69 |
## 8.5.0
|
|
|
70 |
|
|
|
71 |
### Added
|
|
|
72 |
|
|
|
73 |
- Add a method to get an import's media queries (#384)
|
|
|
74 |
- Add more unit tests (#381, #382)
|
|
|
75 |
|
|
|
76 |
### Fixed
|
|
|
77 |
|
|
|
78 |
- Retain CSSList and Rule comments when rendering CSS (#351)
|
|
|
79 |
- Replace invalid `turns` unit with `turn` (#350)
|
|
|
80 |
- Also allow string values for rules (#348)
|
|
|
81 |
- Fix invalid calc parsing (#169)
|
|
|
82 |
- Handle scientific notation when parsing sizes (#179)
|
|
|
83 |
- Fix PHP 8.1 compatibility in `ParserState::strsplit()` (#344)
|
|
|
84 |
|
|
|
85 |
## 8.4.0
|
|
|
86 |
|
|
|
87 |
### Features
|
|
|
88 |
|
|
|
89 |
* Support for PHP 8.x
|
|
|
90 |
* PHPDoc annotations
|
|
|
91 |
* Allow usage of CSS variables inside color functions (by parsing them as
|
|
|
92 |
regular functions)
|
|
|
93 |
* Use PSR-12 code style
|
|
|
94 |
* *No deprecations*
|
|
|
95 |
|
|
|
96 |
### Bugfixes
|
|
|
97 |
|
|
|
98 |
* Improved handling of whitespace in `calc()`
|
|
|
99 |
* Fix parsing units whose prefix is also a valid unit, like `vmin`
|
|
|
100 |
* Allow passing an object to `CSSList#replace`
|
|
|
101 |
* Fix PHP 7.3 warnings
|
|
|
102 |
* Correctly parse keyframes with `%`
|
|
|
103 |
* Don’t convert large numbers to scientific notation
|
|
|
104 |
* Allow a file to end after an `@import`
|
|
|
105 |
* Preserve case of CSS variables as specced
|
|
|
106 |
* Allow identifiers to use escapes the same way as strings
|
|
|
107 |
* No longer use `eval` for the comparison in `getSelectorsBySpecificity`, in
|
|
|
108 |
case it gets passed untrusted input (CVE-2020-13756). Also fixed in 8.3.1,
|
|
|
109 |
8.2.1, 8.1.1, 8.0.1, 7.0.4, 6.0.2, 5.2.1, 5.1.3, 5.0.9, 4.0.1, 3.0.1, 2.0.1,
|
|
|
110 |
1.0.1.
|
|
|
111 |
* Prevent an infinite loop when parsing invalid grid line names
|
|
|
112 |
* Remove invalid unit `vm`
|
|
|
113 |
* Retain rule order after expanding shorthands
|
|
|
114 |
|
|
|
115 |
### Backwards-incompatible changes
|
|
|
116 |
|
|
|
117 |
* PHP ≥ 5.6 is now required
|
|
|
118 |
* HHVM compatibility target dropped
|
|
|
119 |
|
|
|
120 |
## 8.3.0 (2019-02-22)
|
|
|
121 |
|
|
|
122 |
* Refactor parsing logic to mostly reside in the class files whose data
|
|
|
123 |
structure is to be parsed (this should eventually allow us to unit-test
|
|
|
124 |
specific parts of the parsing logic individually).
|
|
|
125 |
* Fix error in parsing `calc` expessions when the first operand is a negative
|
|
|
126 |
number, thanks to @raxbg.
|
|
|
127 |
* Support parsing CSS4 colors in hex notation with alpha values, thanks to
|
|
|
128 |
@raxbg.
|
|
|
129 |
* Swallow more errors in lenient mode, thanks to @raxbg.
|
|
|
130 |
* Allow specifying arbitrary strings to output before and after declaration
|
|
|
131 |
blocks, thanks to @westonruter.
|
|
|
132 |
* *No backwards-incompatible changes*
|
|
|
133 |
* *No deprecations*
|
|
|
134 |
|
|
|
135 |
## 8.2.0 (2018-07-13)
|
|
|
136 |
|
|
|
137 |
* Support parsing `calc()`, thanks to @raxbg.
|
|
|
138 |
* Support parsing grid-lines, again thanks to @raxbg.
|
|
|
139 |
* Support parsing legacy IE filters (`progid:`) in lenient mode, thanks to
|
|
|
140 |
@FMCorz
|
|
|
141 |
* Performance improvements parsing large files, again thanks to @FMCorz
|
|
|
142 |
* *No backwards-incompatible changes*
|
|
|
143 |
* *No deprecations*
|
|
|
144 |
|
|
|
145 |
## 8.1.0 (2016-07-19)
|
|
|
146 |
|
|
|
147 |
* Comments are no longer silently ignored but stored with the object with which
|
|
|
148 |
they appear (no render support, though). Thanks to @FMCorz.
|
|
|
149 |
* The IE hacks using `\0` and `\9` can now be parsed (and rendered) in lenient
|
|
|
150 |
mode. Thanks (again) to @FMCorz.
|
|
|
151 |
* Media queries with or without spaces before the query are parsed. Still no
|
|
|
152 |
*real* parsing support, though. Sorry…
|
|
|
153 |
* PHPUnit is now listed as a dev-dependency in composer.json.
|
|
|
154 |
* *No backwards-incompatible changes*
|
|
|
155 |
* *No deprecations*
|
|
|
156 |
|
|
|
157 |
## 8.0.0 (2016-06-30)
|
|
|
158 |
|
|
|
159 |
* Store source CSS line numbers in tokens and parsing exceptions.
|
|
|
160 |
* *No deprecations*
|
|
|
161 |
|
|
|
162 |
### Backwards-incompatible changes
|
|
|
163 |
|
|
|
164 |
* Unrecoverable parser errors throw an exception of type
|
|
|
165 |
`Sabberworm\CSS\Parsing\SourceException` instead of `\Exception`.
|
|
|
166 |
|
|
|
167 |
## 7.0.3 (2016-04-27)
|
|
|
168 |
|
|
|
169 |
* Fixed parsing empty CSS when multibyte is off
|
|
|
170 |
* *No backwards-incompatible changes*
|
|
|
171 |
* *No deprecations*
|
|
|
172 |
|
|
|
173 |
## 7.0.2 (2016-02-11)
|
|
|
174 |
|
|
|
175 |
* 150 time performance boost thanks
|
|
|
176 |
to @[ossinkine](https://github.com/ossinkine)
|
|
|
177 |
* *No backwards-incompatible changes*
|
|
|
178 |
* *No deprecations*
|
|
|
179 |
|
|
|
180 |
## 7.0.1 (2015-12-25)
|
|
|
181 |
|
|
|
182 |
* No more suppressed `E_NOTICE`
|
|
|
183 |
* *No backwards-incompatible changes*
|
|
|
184 |
* *No deprecations*
|
|
|
185 |
|
|
|
186 |
## 7.0.0 (2015-08-24)
|
|
|
187 |
|
|
|
188 |
* Compatibility with PHP 7. Well timed, eh?
|
|
|
189 |
* *No deprecations*
|
|
|
190 |
|
|
|
191 |
### Backwards-incompatible changes
|
|
|
192 |
|
|
|
193 |
* The `Sabberworm\CSS\Value\String` class has been renamed to
|
|
|
194 |
`Sabberworm\CSS\Value\CSSString`.
|
|
|
195 |
|
|
|
196 |
## 6.0.1 (2015-08-24)
|
|
|
197 |
|
|
|
198 |
* Remove some declarations in interfaces incompatible with PHP 5.3 (< 5.3.9)
|
|
|
199 |
* *No deprecations*
|
|
|
200 |
|
|
|
201 |
## 6.0.0 (2014-07-03)
|
|
|
202 |
|
|
|
203 |
* Format output using Sabberworm\CSS\OutputFormat
|
|
|
204 |
* *No backwards-incompatible changes*
|
|
|
205 |
|
|
|
206 |
### Deprecations
|
|
|
207 |
|
|
|
208 |
* The parse() method replaces __toString with an optional argument (instance of
|
|
|
209 |
the OutputFormat class)
|
|
|
210 |
|
|
|
211 |
## 5.2.0 (2014-06-30)
|
|
|
212 |
|
|
|
213 |
* Support removing a selector from a declaration block using
|
|
|
214 |
`$oBlock->removeSelector($mSelector)`
|
|
|
215 |
* Introduce a specialized exception (Sabberworm\CSS\Parsing\OuputException) for
|
|
|
216 |
exceptions during output rendering
|
|
|
217 |
|
|
|
218 |
* *No deprecations*
|
|
|
219 |
|
|
|
220 |
#### Backwards-incompatible changes
|
|
|
221 |
|
|
|
222 |
* Outputting a declaration block that has no selectors throws an OuputException
|
|
|
223 |
instead of outputting an invalid ` {…}` into the CSS document.
|
|
|
224 |
|
|
|
225 |
## 5.1.2 (2013-10-30)
|
|
|
226 |
|
|
|
227 |
* Remove the use of consumeUntil in comment parsing. This makes it possible to
|
|
|
228 |
parse comments such as `/** Perfectly valid **/`
|
|
|
229 |
* Add fr relative size unit
|
|
|
230 |
* Fix some issues with HHVM
|
|
|
231 |
* *No backwards-incompatible changes*
|
|
|
232 |
* *No deprecations*
|
|
|
233 |
|
|
|
234 |
## 5.1.1 (2013-10-28)
|
|
|
235 |
|
|
|
236 |
* Updated CHANGELOG.md to reflect changes since 5.0.4
|
|
|
237 |
* *No backwards-incompatible changes*
|
|
|
238 |
* *No deprecations*
|
|
|
239 |
|
|
|
240 |
## 5.1.0 (2013-10-24)
|
|
|
241 |
|
|
|
242 |
* Performance enhancements by Michael M Slusarz
|
|
|
243 |
* More rescue entry points for lenient parsing (unexpected tokens between
|
|
|
244 |
declaration blocks and unclosed comments)
|
|
|
245 |
* *No backwards-incompatible changes*
|
|
|
246 |
* *No deprecations*
|
|
|
247 |
|
|
|
248 |
## 5.0.8 (2013-08-15)
|
|
|
249 |
|
|
|
250 |
* Make default settings’ multibyte parsing option dependent on whether or not
|
|
|
251 |
the mbstring extension is actually installed.
|
|
|
252 |
* *No backwards-incompatible changes*
|
|
|
253 |
* *No deprecations*
|
|
|
254 |
|
|
|
255 |
## 5.0.7 (2013-08-04)
|
|
|
256 |
|
|
|
257 |
* Fix broken decimal point output optimization
|
|
|
258 |
* *No backwards-incompatible changes*
|
|
|
259 |
* *No deprecations*
|
|
|
260 |
|
|
|
261 |
## 5.0.6 (2013-05-31)
|
|
|
262 |
|
|
|
263 |
* Fix broken unit test
|
|
|
264 |
* *No backwards-incompatible changes*
|
|
|
265 |
* *No deprecations*
|
|
|
266 |
|
|
|
267 |
## 5.0.5 (2013-04-17)
|
|
|
268 |
|
|
|
269 |
* Initial support for lenient parsing (setting this parser option will catch
|
|
|
270 |
some exceptions internally and recover the parser’s state as neatly as
|
|
|
271 |
possible).
|
|
|
272 |
* *No backwards-incompatible changes*
|
|
|
273 |
* *No deprecations*
|
|
|
274 |
|
|
|
275 |
## 5.0.4 (2013-03-21)
|
|
|
276 |
|
|
|
277 |
* Don’t output floats with locale-aware separator chars
|
|
|
278 |
* *No backwards-incompatible changes*
|
|
|
279 |
* *No deprecations*
|
|
|
280 |
|
|
|
281 |
## 5.0.3 (2013-03-21)
|
|
|
282 |
|
|
|
283 |
* More size units recognized
|
|
|
284 |
* *No backwards-incompatible changes*
|
|
|
285 |
* *No deprecations*
|
|
|
286 |
|
|
|
287 |
## 5.0.2 (2013-03-21)
|
|
|
288 |
|
|
|
289 |
* CHANGELOG.md file added to distribution
|
|
|
290 |
* *No backwards-incompatible changes*
|
|
|
291 |
* *No deprecations*
|
|
|
292 |
|
|
|
293 |
## 5.0.1 (2013-03-20)
|
|
|
294 |
|
|
|
295 |
* Internal cleanup
|
|
|
296 |
* *No backwards-incompatible changes*
|
|
|
297 |
* *No deprecations*
|
|
|
298 |
|
|
|
299 |
## 5.0.0 (2013-03-20)
|
|
|
300 |
|
|
|
301 |
* Correctly parse all known CSS 3 units (including Hz and kHz).
|
|
|
302 |
* Output RGB colors in short (#aaa or #ababab) notation
|
|
|
303 |
* Be case-insensitive when parsing identifiers.
|
|
|
304 |
* *No deprecations*
|
|
|
305 |
|
|
|
306 |
### Backwards-incompatible changes
|
|
|
307 |
|
|
|
308 |
* `Sabberworm\CSS\Value\Color`’s `__toString` method overrides `CSSList`’s to
|
|
|
309 |
maybe return something other than `type(value, …)` (see above).
|
|
|
310 |
|
|
|
311 |
## 4.0.0 (2013-03-19)
|
|
|
312 |
|
|
|
313 |
* Support for more @-rules
|
|
|
314 |
* Generic interface `Sabberworm\CSS\Property\AtRule`, implemented by all @-rule
|
|
|
315 |
classes
|
|
|
316 |
* *No deprecations*
|
|
|
317 |
|
|
|
318 |
### Backwards-incompatible changes
|
|
|
319 |
|
|
|
320 |
* `Sabberworm\CSS\RuleSet\AtRule` renamed to `Sabberworm\CSS\RuleSet\AtRuleSet`
|
|
|
321 |
* `Sabberworm\CSS\CSSList\MediaQuery` renamed to
|
|
|
322 |
`Sabberworm\CSS\RuleSet\CSSList\AtRuleBlockList` with differing semantics and
|
|
|
323 |
API (which also works for other block-list-based @-rules like `@supports`).
|
|
|
324 |
|
|
|
325 |
## 3.0.0 (2013-03-06)
|
|
|
326 |
|
|
|
327 |
* Support for lenient parsing (on by default)
|
|
|
328 |
* *No deprecations*
|
|
|
329 |
|
|
|
330 |
### Backwards-incompatible changes
|
|
|
331 |
|
|
|
332 |
* All properties (like whether or not to use `mb_`-functions, which default
|
|
|
333 |
charset to use and – new – whether or not to be forgiving when parsing) are
|
|
|
334 |
now encapsulated in an instance of `Sabberworm\CSS\Settings` which can be
|
|
|
335 |
passed as the second argument to `Sabberworm\CSS\Parser->__construct()`.
|
|
|
336 |
* Specifying a charset as the second argument to
|
|
|
337 |
`Sabberworm\CSS\Parser->__construct()` is no longer supported. Use
|
|
|
338 |
`Sabberworm\CSS\Settings::create()->withDefaultCharset('some-charset')`
|
|
|
339 |
instead.
|
|
|
340 |
* Setting `Sabberworm\CSS\Parser->bUseMbFunctions` has no effect. Use
|
|
|
341 |
`Sabberworm\CSS\Settings::create()->withMultibyteSupport(true/false)` instead.
|
|
|
342 |
* `Sabberworm\CSS\Parser->parse()` may throw a
|
|
|
343 |
`Sabberworm\CSS\Parsing\UnexpectedTokenException` when in strict parsing mode.
|
|
|
344 |
|
|
|
345 |
## 2.0.0 (2013-01-29)
|
|
|
346 |
|
|
|
347 |
* Allow multiple rules of the same type per rule set
|
|
|
348 |
|
|
|
349 |
### Backwards-incompatible changes
|
|
|
350 |
|
|
|
351 |
* `Sabberworm\CSS\RuleSet->getRules()` returns an index-based array instead of
|
|
|
352 |
an associative array. Use `Sabberworm\CSS\RuleSet->getRulesAssoc()` (which
|
|
|
353 |
eliminates duplicate rules and lets the later rule of the same name win).
|
|
|
354 |
* `Sabberworm\CSS\RuleSet->removeRule()` works as it did before except when
|
|
|
355 |
passed an instance of `Sabberworm\CSS\Rule\Rule`, in which case it would only
|
|
|
356 |
remove the exact rule given instead of all the rules of the same type. To get
|
|
|
357 |
the old behaviour, use `Sabberworm\CSS\RuleSet->removeRule($oRule->getRule()`;
|
|
|
358 |
|
|
|
359 |
## 1.0
|
|
|
360 |
|
|
|
361 |
Initial release of a stable public API.
|
|
|
362 |
|
|
|
363 |
## 0.9
|
|
|
364 |
|
|
|
365 |
Last version not to use PSR-0 project organization semantics.
|