You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+77-32Lines changed: 77 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -28,13 +28,15 @@ This project adheres to [Semantic Versioning](https://semver.org/).
28
28
## 8.6.0
29
29
30
30
### Added
31
+
31
32
- Support arithmetic operators in CSS function arguments (#607)
32
33
- Add support for inserting an item in a CSS list (#545)
33
34
- Add support for the `dvh`, `lvh` and `svh` length units (#415)
34
35
35
36
### Changed
36
37
37
-
- Improve performance of Value::parseValue with many delimiters by refactoring to remove array_search() (#413)
38
+
- Improve performance of Value::parseValue with many delimiters by refactoring
39
+
to remove `array_search()` (#413)
38
40
39
41
## 8.5.2
40
42
@@ -50,7 +52,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
50
52
51
53
### Fixed
52
54
53
-
- Fix PHP notice caused by parsing invalid color values having less than 6 characters (#485)
55
+
- Fix PHP notice caused by parsing invalid color values having less than
56
+
6 characters (#485)
54
57
- Fix (regression) failure to parse at-rules with strict parsing (#456)
55
58
56
59
## 8.5.0
@@ -75,7 +78,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
75
78
76
79
* Support for PHP 8.x
77
80
* PHPDoc annotations
78
-
* Allow usage of CSS variables inside color functions (by parsing them as regular functions)
81
+
* Allow usage of CSS variables inside color functions (by parsing them as
82
+
regular functions)
79
83
* Use PSR-12 code style
80
84
**No deprecations*
81
85
@@ -90,7 +94,10 @@ This project adheres to [Semantic Versioning](https://semver.org/).
90
94
* Allow a file to end after an `@import`
91
95
* Preserve case of CSS variables as specced
92
96
* Allow identifiers to use escapes the same way as strings
93
-
* No longer use `eval` for the comparison in `getSelectorsBySpecificity`, in case it gets passed untrusted input (CVE-2020-13756). Also fixed in 8.3.1, 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, 1.0.1.
97
+
* No longer use `eval` for the comparison in `getSelectorsBySpecificity`, in
98
+
case it gets passed untrusted input (CVE-2020-13756). Also fixed in 8.3.1,
* Prevent an infinite loop when parsing invalid grid line names
95
102
* Remove invalid unit `vm`
96
103
* Retain rule order after expanding shorthands
@@ -102,28 +109,37 @@ This project adheres to [Semantic Versioning](https://semver.org/).
102
109
103
110
## 8.3.0 (2019-02-22)
104
111
105
-
* Refactor parsing logic to mostly reside in the class files whose data structure is to be parsed (this should eventually allow us to unit-test specific parts of the parsing logic individually).
106
-
* Fix error in parsing `calc` expessions when the first operand is a negative number, thanks to @raxbg.
107
-
* Support parsing CSS4 colors in hex notation with alpha values, thanks to @raxbg.
112
+
* Refactor parsing logic to mostly reside in the class files whose data
113
+
structure is to be parsed (this should eventually allow us to unit-test
114
+
specific parts of the parsing logic individually).
115
+
* Fix error in parsing `calc` expessions when the first operand is a negative
116
+
number, thanks to @raxbg.
117
+
* Support parsing CSS4 colors in hex notation with alpha values, thanks to
118
+
@raxbg.
108
119
* Swallow more errors in lenient mode, thanks to @raxbg.
109
-
* Allow specifying arbitrary strings to output before and after declaration blocks, thanks to @westonruter.
120
+
* Allow specifying arbitrary strings to output before and after declaration
121
+
blocks, thanks to @westonruter.
110
122
**No backwards-incompatible changes*
111
123
**No deprecations*
112
124
113
125
## 8.2.0 (2018-07-13)
114
126
115
127
* Support parsing `calc()`, thanks to @raxbg.
116
128
* Support parsing grid-lines, again thanks to @raxbg.
117
-
* Support parsing legacy IE filters (`progid:`) in lenient mode, thanks to @FMCorz
129
+
* Support parsing legacy IE filters (`progid:`) in lenient mode, thanks to
130
+
@FMCorz
118
131
* Performance improvements parsing large files, again thanks to @FMCorz
119
132
**No backwards-incompatible changes*
120
133
**No deprecations*
121
134
122
135
## 8.1.0 (2016-07-19)
123
136
124
-
* Comments are no longer silently ignored but stored with the object with which they appear (no render support, though). Thanks to @FMCorz.
125
-
* The IE hacks using `\0` and `\9` can now be parsed (and rendered) in lenient mode. Thanks (again) to @FMCorz.
126
-
* Media queries with or without spaces before the query are parsed. Still no *real* parsing support, though. Sorry…
137
+
* Comments are no longer silently ignored but stored with the object with which
138
+
they appear (no render support, though). Thanks to @FMCorz.
139
+
* The IE hacks using `\0` and `\9` can now be parsed (and rendered) in lenient
140
+
mode. Thanks (again) to @FMCorz.
141
+
* Media queries with or without spaces before the query are parsed. Still no
142
+
*real* parsing support, though. Sorry…
127
143
* PHPUnit is now listed as a dev-dependency in composer.json.
128
144
**No backwards-incompatible changes*
129
145
**No deprecations*
@@ -135,7 +151,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
135
151
136
152
### Backwards-incompatible changes
137
153
138
-
* Unrecoverable parser errors throw an exception of type `Sabberworm\CSS\Parsing\SourceException` instead of `\Exception`.
154
+
* Unrecoverable parser errors throw an exception of type
155
+
`Sabberworm\CSS\Parsing\SourceException` instead of `\Exception`.
139
156
140
157
## 7.0.3 (2016-04-27)
141
158
@@ -145,7 +162,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
145
162
146
163
## 7.0.2 (2016-02-11)
147
164
148
-
* 150 time performance boost thanks to @[ossinkine](https://github.com/ossinkine)
165
+
* 150 time performance boost thanks
166
+
to @[ossinkine](https://github.com/ossinkine)
149
167
**No backwards-incompatible changes*
150
168
**No deprecations*
151
169
@@ -162,7 +180,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
162
180
163
181
### Backwards-incompatible changes
164
182
165
-
* The `Sabberworm\CSS\Value\String` class has been renamed to `Sabberworm\CSS\Value\CSSString`.
183
+
* The `Sabberworm\CSS\Value\String` class has been renamed to
184
+
`Sabberworm\CSS\Value\CSSString`.
166
185
167
186
## 6.0.1 (2015-08-24)
168
187
@@ -176,22 +195,27 @@ This project adheres to [Semantic Versioning](https://semver.org/).
176
195
177
196
### Deprecations
178
197
179
-
* The parse() method replaces __toString with an optional argument (instance of the OutputFormat class)
198
+
* The parse() method replaces __toString with an optional argument (instance of
199
+
the OutputFormat class)
180
200
181
201
## 5.2.0 (2014-06-30)
182
202
183
-
* Support removing a selector from a declaration block using `$oBlock->removeSelector($mSelector)`
184
-
* Introduce a specialized exception (Sabberworm\CSS\Parsing\OuputException) for exceptions during output rendering
203
+
* Support removing a selector from a declaration block using
204
+
`$oBlock->removeSelector($mSelector)`
205
+
* Introduce a specialized exception (Sabberworm\CSS\Parsing\OuputException) for
206
+
exceptions during output rendering
185
207
186
208
**No deprecations*
187
209
188
210
#### Backwards-incompatible changes
189
211
190
-
* Outputting a declaration block that has no selectors throws an OuputException instead of outputting an invalid ` {…}` into the CSS document.
212
+
* Outputting a declaration block that has no selectors throws an OuputException
213
+
instead of outputting an invalid ` {…}` into the CSS document.
191
214
192
215
## 5.1.2 (2013-10-30)
193
216
194
-
* Remove the use of consumeUntil in comment parsing. This makes it possible to parse comments such as `/** Perfectly valid **/`
217
+
* Remove the use of consumeUntil in comment parsing. This makes it possible to
218
+
parse comments such as `/** Perfectly valid **/`
195
219
* Add fr relative size unit
196
220
* Fix some issues with HHVM
197
221
**No backwards-incompatible changes*
@@ -206,13 +230,15 @@ This project adheres to [Semantic Versioning](https://semver.org/).
206
230
## 5.1.0 (2013-10-24)
207
231
208
232
* Performance enhancements by Michael M Slusarz
209
-
* More rescue entry points for lenient parsing (unexpected tokens between declaration blocks and unclosed comments)
233
+
* More rescue entry points for lenient parsing (unexpected tokens between
234
+
declaration blocks and unclosed comments)
210
235
**No backwards-incompatible changes*
211
236
**No deprecations*
212
237
213
238
## 5.0.8 (2013-08-15)
214
239
215
-
* Make default settings’ multibyte parsing option dependent on whether or not the mbstring extension is actually installed.
240
+
* Make default settings’ multibyte parsing option dependent on whether or not
241
+
the mbstring extension is actually installed.
216
242
**No backwards-incompatible changes*
217
243
**No deprecations*
218
244
@@ -230,7 +256,9 @@ This project adheres to [Semantic Versioning](https://semver.org/).
230
256
231
257
## 5.0.5 (2013-04-17)
232
258
233
-
* Initial support for lenient parsing (setting this parser option will catch some exceptions internally and recover the parser’s state as neatly as possible).
259
+
* Initial support for lenient parsing (setting this parser option will catch
260
+
some exceptions internally and recover the parser’s state as neatly as
261
+
possible).
234
262
**No backwards-incompatible changes*
235
263
**No deprecations*
236
264
@@ -267,18 +295,22 @@ This project adheres to [Semantic Versioning](https://semver.org/).
267
295
268
296
### Backwards-incompatible changes
269
297
270
-
*`Sabberworm\CSS\Value\Color`’s `__toString` method overrides `CSSList`’s to maybe return something other than `type(value, …)` (see above).
298
+
*`Sabberworm\CSS\Value\Color`’s `__toString` method overrides `CSSList`’s to
299
+
maybe return something other than `type(value, …)` (see above).
271
300
272
301
## 4.0.0 (2013-03-19)
273
302
274
303
* Support for more @-rules
275
-
* Generic interface `Sabberworm\CSS\Property\AtRule`, implemented by all @-rule classes
304
+
* Generic interface `Sabberworm\CSS\Property\AtRule`, implemented by all @-rule
305
+
classes
276
306
**No deprecations*
277
307
278
308
### Backwards-incompatible changes
279
309
280
310
*`Sabberworm\CSS\RuleSet\AtRule` renamed to `Sabberworm\CSS\RuleSet\AtRuleSet`
281
-
*`Sabberworm\CSS\CSSList\MediaQuery` renamed to `Sabberworm\CSS\RuleSet\CSSList\AtRuleBlockList` with differing semantics and API (which also works for other block-list-based @-rules like `@supports`).
311
+
*`Sabberworm\CSS\CSSList\MediaQuery` renamed to
312
+
`Sabberworm\CSS\RuleSet\CSSList\AtRuleBlockList` with differing semantics and
313
+
API (which also works for other block-list-based @-rules like `@supports`).
282
314
283
315
## 3.0.0 (2013-03-06)
284
316
@@ -287,19 +319,32 @@ This project adheres to [Semantic Versioning](https://semver.org/).
287
319
288
320
### Backwards-incompatible changes
289
321
290
-
* All properties (like whether or not to use `mb_`-functions, which default charset to use and – new – whether or not to be forgiving when parsing) are now encapsulated in an instance of `Sabberworm\CSS\Settings` which can be passed as the second argument to `Sabberworm\CSS\Parser->__construct()`.
291
-
* Specifying a charset as the second argument to `Sabberworm\CSS\Parser->__construct()` is no longer supported. Use `Sabberworm\CSS\Settings::create()->withDefaultCharset('some-charset')` instead.
292
-
* Setting `Sabberworm\CSS\Parser->bUseMbFunctions` has no effect. Use `Sabberworm\CSS\Settings::create()->withMultibyteSupport(true/false)` instead.
293
-
*`Sabberworm\CSS\Parser->parse()` may throw a `Sabberworm\CSS\Parsing\UnexpectedTokenException` when in strict parsing mode.
322
+
* All properties (like whether or not to use `mb_`-functions, which default
323
+
charset to use and – new – whether or not to be forgiving when parsing) are
324
+
now encapsulated in an instance of `Sabberworm\CSS\Settings` which can be
325
+
passed as the second argument to `Sabberworm\CSS\Parser->__construct()`.
326
+
* Specifying a charset as the second argument to
327
+
`Sabberworm\CSS\Parser->__construct()` is no longer supported. Use
`Sabberworm\CSS\Parsing\UnexpectedTokenException` when in strict parsing mode.
294
334
295
335
## 2.0.0 (2013-01-29)
296
336
297
337
* Allow multiple rules of the same type per rule set
298
338
299
339
### Backwards-incompatible changes
300
340
301
-
*`Sabberworm\CSS\RuleSet->getRules()` returns an index-based array instead of an associative array. Use `Sabberworm\CSS\RuleSet->getRulesAssoc()` (which eliminates duplicate rules and lets the later rule of the same name win).
302
-
*`Sabberworm\CSS\RuleSet->removeRule()` works as it did before except when passed an instance of `Sabberworm\CSS\Rule\Rule`, in which case it would only remove the exact rule given instead of all the rules of the same type. To get the old behaviour, use `Sabberworm\CSS\RuleSet->removeRule($oRule->getRule()`;
341
+
*`Sabberworm\CSS\RuleSet->getRules()` returns an index-based array instead of
342
+
an associative array. Use `Sabberworm\CSS\RuleSet->getRulesAssoc()` (which
343
+
eliminates duplicate rules and lets the later rule of the same name win).
344
+
*`Sabberworm\CSS\RuleSet->removeRule()` works as it did before except when
345
+
passed an instance of `Sabberworm\CSS\Rule\Rule`, in which case it would only
346
+
remove the exact rule given instead of all the rules of the same type. To get
347
+
the old behaviour, use `Sabberworm\CSS\RuleSet->removeRule($oRule->getRule()`;
0 commit comments