| 1 |
# Changelog |
| 2 |
|
| 3 |
## v5.5.0 |
| 4 |
|
| 5 |
Added: |
| 6 |
* Add support for CSS4 `#RRGGBBAA` colors. (Hannah Okwelum) [T403056](https://phabricator.wikimedia.org/T403056) |
| 7 |
* Add support for native CSS color functions including with CSS variables. (Hannah Okwelum) [T405815](https://phabricator.wikimedia.org/T405815) |
| 8 |
|
| 9 |
Fixed: |
| 10 |
* Fix "Using null as the key parameter for array_key_exists" PHP 8.5 warning. (del72683) [T410596](https://phabricator.wikimedia.org/T410596) |
| 11 |
* Fix interpolation of string with number followed by underscore. (Timo Tijhof) [Less.js #2462](https://github.com/less/less.js/issues/2462) |
| 12 |
* Less_Functions: Fix "Using null as an array offset is deprecated" PHP 8.5 warnings. (Hannah Okwelum) [T411398](https://phabricator.wikimedia.org/T411398) |
| 13 |
* Less_ImportVisitor: Fix "Using null as an array offset" PHP 8.5 warning. (Hannah Okwelum) [T411400](https://phabricator.wikimedia.org/T411400) |
| 14 |
* Less_Parser: Fix "ord(): Providing an empty string is deprecated" PHP 8.5 warning. (Hannah Okwelum) [T411397](https://phabricator.wikimedia.org/T411397) |
| 15 |
|
| 16 |
## v5.4.0 |
| 17 |
|
| 18 |
Added: |
| 19 |
* Add support for Logical Functions `if()` and `boolean()`. (Hannah Okwelum) [T393383](https://phabricator.wikimedia.org/T393383) |
| 20 |
|
| 21 |
Changed: |
| 22 |
* Remove support for PHP 7.4 and 8.0. Raise requirement to PHP 8.1+. (James D. Forrester) |
| 23 |
|
| 24 |
## v5.3.1 |
| 25 |
|
| 26 |
Fixed: |
| 27 |
* Fix `PHP Warning: Undefined property $value` in `extract()`. (Timo Tijhof) [T391735](https://phabricator.wikimedia.org/T391735) |
| 28 |
|
| 29 |
## v5.3.0 |
| 30 |
|
| 31 |
Added: |
| 32 |
* Less_Parser: Add `cache_incremental` option. Set this to false via `Less_Cache` to use the fast whole-output cache without the memory-intensive incremental cache. (Timo Tijhof) |
| 33 |
|
| 34 |
Deprecated: |
| 35 |
* Deprecate `Less_Cache::CheckCacheDir()` as public method. This is called automatically. |
| 36 |
* Deprecate `Less_Cache::CleanCache()` as public method. This is called automatically. |
| 37 |
* Deprecate `Less_Parser::SetCacheDir()`. Set the `cache_dir` option, or use `Less_Cache::SetCacheDir()` instead. |
| 38 |
|
| 39 |
## v5.2.2 |
| 40 |
|
| 41 |
Fixed: |
| 42 |
* Fix ParseError on CSS variable when there is no trailing semicolon (Hannah Okwelum) [T386077](https://phabricator.wikimedia.org/T386077) |
| 43 |
* Support functions calls in CSS variable value after first comma (Hannah Okwelum) [T386079](https://phabricator.wikimedia.org/T386079) |
| 44 |
|
| 45 |
## v5.2.1 |
| 46 |
|
| 47 |
Fixed: |
| 48 |
* Fix un-parenthesized nested operation via a variable (Hannah Okwelum) [T386074](https://phabricator.wikimedia.org/T386074) |
| 49 |
* Faster Less_Visitor_joinSelector by skipping Declaration blocks (ubermanu) |
| 50 |
|
| 51 |
## v5.2.0 |
| 52 |
|
| 53 |
Added: |
| 54 |
* Add support for BrianHenryIE/strauss codemod in Less_Visitor (Stefan Warnat) |
| 55 |
|
| 56 |
Fixed: |
| 57 |
* Fix "PHP Warning: Undefined array key currentUri" when using `@import (inline)` (tck) [T380641](https://phabricator.wikimedia.org/T380641) |
| 58 |
* Fix "Implicit conversion from float to int" PHP 8.1 warning when using `hsv()` (Peter Knut) |
| 59 |
* Less_Visitor: Faster class mapping in `visitObj` by using inline cache (Thiemo Kreuz) |
| 60 |
|
| 61 |
## v5.1.2 |
| 62 |
|
| 63 |
Fixed: |
| 64 |
* Less_Functions: Fix "Implicitly nullable parameter" PHP 8.4 warning (Reedy) [T376276](https://phabricator.wikimedia.org/T376276) |
| 65 |
|
| 66 |
## v5.1.1 |
| 67 |
|
| 68 |
Fixed: |
| 69 |
* Fix compiling of PHP-injected variables with false, null or empty string (Hannah Okwelum) |
| 70 |
|
| 71 |
## v5.1.0 |
| 72 |
|
| 73 |
Added: |
| 74 |
* Add support for property acessors (Piotr Miazga) [T368408](https://phabricator.wikimedia.org/T368408) |
| 75 |
* Increase parsing flexibility around at-rule blocks and custom properties (Piotr Miazga) [T368408](https://phabricator.wikimedia.org/T368408) |
| 76 |
* Add support for Namespaces and Accessors (Piotr Miazga) [T368409](https://phabricator.wikimedia.org/T368409) |
| 77 |
|
| 78 |
Fixed: |
| 79 |
* Fix parse error when opacity is set to zero in `alpha()` function (Hannah Okwelum) [T371606](https://phabricator.wikimedia.org/T371606) |
| 80 |
|
| 81 |
## v5.0.0 |
| 82 |
|
| 83 |
Added: |
| 84 |
* Add support for Lessjs 3.5.0 `calc()` exception (Piotr Miazga) [T367186](https://phabricator.wikimedia.org/T367186) |
| 85 |
* Add support for CSS Grid syntax (Dringsim) [T288498](https://phabricator.wikimedia.org/T288498) |
| 86 |
* Add support for `\9` escapes in CSS keyword (Dringsim) [T288498](https://phabricator.wikimedia.org/T288498) |
| 87 |
* Add Less_Parser "math" option, renamed from strictMath (Hannah Okwelum) [T366445](https://phabricator.wikimedia.org/T366445) |
| 88 |
|
| 89 |
Changed: |
| 90 |
* Change Less_Parser "math" default from "always" to "parens-division" (Hannah Okwelum) [T366445](https://phabricator.wikimedia.org/T366445) |
| 91 |
* Change `Less_Version::less_version` to "3.13.3". This end compatibility support of Less.js 2.5.3. |
| 92 |
Less.php 5.0 and later will target Less.js 3.13.1 behaviour instead. (Piotr Miazga) |
| 93 |
|
| 94 |
Removed: |
| 95 |
* Remove `import_callback` Less_Parser option (Hannah Okwelum) |
| 96 |
* Remove backtick evaluation inside quoted strings (Bartosz Dziewoński) |
| 97 |
* Remove `Less_Parser::AllParsedFiles()` (Hannah Okwelum) |
| 98 |
* Remove Less_Parser->SetInput() public method, now private (Hannah Okwelum) |
| 99 |
* Remove Less_Parser->CacheFile() public method, now private (Hannah Okwelum) |
| 100 |
* Remove Less_Parser->UnsetInput() public method, now private (Hannah Okwelum) |
| 101 |
* Remove Less_Parser->save() public method, now private (Hannah Okwelum) |
| 102 |
|
| 103 |
## v4.4.1 |
| 104 |
|
| 105 |
Fixed: |
| 106 |
* Update `Less_Version::version` and bump `Less_Version::cache_version` (Timo Tijhof) |
| 107 |
|
| 108 |
## v4.4.0 |
| 109 |
|
| 110 |
Added: |
| 111 |
* Add `image-size()` function, disable base64 for SVG `data-uri()` (Hannah Okwelum) [T353147](https://phabricator.wikimedia.org/T353147) |
| 112 |
* Improve support for preserving `!important` via variables (Piotr Miazga) [T362341](https://phabricator.wikimedia.org/T362341) |
| 113 |
* Add support for include path inside `data-uri()` (Hannah Okwelum) [T364871](https://phabricator.wikimedia.org/T364871) |
| 114 |
|
| 115 |
Changed, to match Less.js 2.5.3: |
| 116 |
* Fix multiplication of mixed units to preserve the first unit (Piotr Miazga) [T362341](https://phabricator.wikimedia.org/T362341) |
| 117 |
|
| 118 |
Fixed: |
| 119 |
* Fix checking of guard conditions in nested mixins (Hannah Okwelum) [T352867](https://phabricator.wikimedia.org/T352867) |
| 120 |
* Less_Functions: Avoid clobbering `clamp()` with internal helper (Timo Tijhof) [T363728](https://phabricator.wikimedia.org/T363728) |
| 121 |
|
| 122 |
## v4.3.0 |
| 123 |
|
| 124 |
Added: |
| 125 |
* Support interpolated variable imports, via ImportVisitor (Hannah Okwelum) [T353133](https://phabricator.wikimedia.org/T353133) |
| 126 |
* Support rulesets as default values of a mixin parameter (Hannah Okwelum) [T353143](https://phabricator.wikimedia.org/T353143) |
| 127 |
* Support `...` expand operator in mixin calls (Piotr Miazga) [T352897](https://phabricator.wikimedia.org/T352897) |
| 128 |
* Improve support for `@import (reference)` matching Less.js 2.x (Hannah Okwelum) [T362647](https://phabricator.wikimedia.org/T362647) |
| 129 |
|
| 130 |
Changed: |
| 131 |
* Improve `mix()` argument exception message to mention given arg type (Timo Tijhof) |
| 132 |
* The `Less_Tree_Import->getPath()` method now reflects the path as written in the source code, |
| 133 |
without auto-appended `.less` suffix, matching upstream Less.js 2.5.3 behaviour. |
| 134 |
This internal detail is exposed via the deprecated `import_callback` parser option. |
| 135 |
It is recommended to migrate to `Less_Parser->SetImportDirs`, which doesn't expose internals, |
| 136 |
and is unaffected by this change. |
| 137 |
|
| 138 |
Deprecated: |
| 139 |
* Deprecate `import_callback` Less_Parser option. Use `Less_Parser->SetImportDirs` with callback instead. |
| 140 |
* Deprecate `Less_Parser->SetInput()` as public method. Use `Less_Parser->parseFile()` instead. |
| 141 |
* Deprecate `Less_Parser->CacheFile()` as public method. Use `Less_Cache` API instead. |
| 142 |
* Deprecate `Less_Parser::AllParsedFiles()` as static method. Use `Less_Parser->getParsedFiles()` instead. |
| 143 |
* Deprecate `Less_Parser->UnsetInput()` as public method, considered internal. |
| 144 |
* Deprecate `Less_Parser->save()` as public method, considered internal. |
| 145 |
|
| 146 |
Fixed: |
| 147 |
* Fix `replace()` when passed multiple replacements (Roan Kattouw) [T358631](https://phabricator.wikimedia.org/T358631) |
| 148 |
* Fix unexpected duplicating of uncalled mixin rules (Hannah Okwelum) [T363076](https://phabricator.wikimedia.org/T363076) |
| 149 |
* Fix ParseError for comments after rule name or in `@keyframes` (Piotr Miazga) [T353131](https://phabricator.wikimedia.org/T353131) |
| 150 |
* Fix ParseError for comments in more places and preserve them (Piotr Miazga) [T353132](https://phabricator.wikimedia.org/T353132) |
| 151 |
* Fix ParseError effecting pseudo classes with `when` guards (Piotr Miazga) [T353144](https://phabricator.wikimedia.org/T353144) |
| 152 |
* Fix preservation of units in some cases (Timo Tijhof) [T360065](https://phabricator.wikimedia.org/T360065) |
| 153 |
* Less_Parser: Faster matching by inlining `matcher()` chains (Timo Tijhof) |
| 154 |
* Less_Parser: Faster matching with `matchStr()` method (Timo Tijhof) |
| 155 |
|
| 156 |
## v4.2.1 |
| 157 |
|
| 158 |
Added: |
| 159 |
* Add support for `/deep/` selectors (Hannah Okwelum) [T352862](https://phabricator.wikimedia.org/T352862) |
| 160 |
|
| 161 |
Fixed: |
| 162 |
* Fix ParseError in some division expressions (Hannah Okwelum) [T358256](https://phabricator.wikimedia.org/T358256) |
| 163 |
* Fix `when()` matching between string and non-string (Timo Tijhof) [T358159](https://phabricator.wikimedia.org/T358159) |
| 164 |
* Preserve whitespace before `;` or `!` in simple rules (Hannah Okwelum) [T352911](https://phabricator.wikimedia.org/T352911) |
| 165 |
|
| 166 |
## v4.2.0 |
| 167 |
|
| 168 |
Added: |
| 169 |
* Add `isruleset()` function (Hannah Okwelum) [T354895](https://phabricator.wikimedia.org/T354895) |
| 170 |
* Add source details to "Operation on an invalid type" error (Hannah Okwelum) [T344197](https://phabricator.wikimedia.org/T344197) |
| 171 |
* Add support for `method=relative` parameter in color functions (Hannah Okwelum) [T354895](https://phabricator.wikimedia.org/T354895) |
| 172 |
* Add support for comments in variables and function parameters (Hannah Okwelum) [T354895](https://phabricator.wikimedia.org/T354895) |
| 173 |
* Less_Parser: Add `functions` parser option API (Hannah Okwelum) |
| 174 |
|
| 175 |
Changed, to match Less.js 2.5.3: |
| 176 |
* Preserve original color keywords and shorthand hex (Hannah Okwelum) [T352866](https://phabricator.wikimedia.org/T352866) |
| 177 |
|
| 178 |
Fixed: |
| 179 |
* Fix PHP Warning when using a dynamic variable name like `@@name` (Hannah Okwelum) [T352830](https://phabricator.wikimedia.org/T352830) |
| 180 |
* Fix PHP Warning when `@extend` path contains non-quoted attribute (Gr8b) [T349433](https://phabricator.wikimedia.org/T349433) |
| 181 |
* Less_Parser: Faster `skipWhitespace` by using native `strspn` (Umherirrender) |
| 182 |
* Less_Parser: Fix Less_Tree_JavaScript references to consistently be in camel-case (Stefan Fröhlich) |
| 183 |
* Fix `!important` in nested mixins (Hannah Okwelum) [T353141](https://phabricator.wikimedia.org/T353141) |
| 184 |
* Fix crash when using recursive mixins (Timo Tijhof) [T352829](https://phabricator.wikimedia.org/T352829) |
| 185 |
* Fix disappearing selectors in certain nested blocks (Hannah Okwelum) [T352859](https://phabricator.wikimedia.org/T352859) |
| 186 |
* Fix Less_Exception_Compiler when passing unquoted value to `color()` (Hannah Okwelum) [T353289](https://phabricator.wikimedia.org/T353289) |
| 187 |
* Fix order of comments in `@font-face` blocks (Timo Tijhof) [T356706](https://phabricator.wikimedia.org/T356706) |
| 188 |
* Fix string comparison to ignore quote type (Timo Tijhof) [T357160](https://phabricator.wikimedia.org/T357160) |
| 189 |
* Fix string interpolation in selectors (Hannah Okwelum) [T353142](https://phabricator.wikimedia.org/T353142) |
| 190 |
|
| 191 |
## v4.1.1 |
| 192 |
|
| 193 |
* Less_Parser: Faster `MatchQuoted` by using native `strcspn`. (Thiemo Kreuz) |
| 194 |
* Less_Parser: Faster `parseEntitiesQuoted` by inlining `MatchQuoted`. (Thiemo Kreuz) |
| 195 |
* Less_Parser: Faster `parseUnicodeDescriptor` and `parseEntitiesJavascript` by first-char checks. (Thiemo Kreuz) |
| 196 |
* Less_Tree_Mixin_Call: Include mixin name in error message (Jeremy P) |
| 197 |
* Fix mismatched casing in class names to fix autoloading on case-sensitive filesystems (Jeremy P) |
| 198 |
|
| 199 |
## v4.1.0 |
| 200 |
|
| 201 |
* Add support for `@supports` blocks. (Anne Tomasevich) [T332923](http://phabricator.wikimedia.org/T332923) |
| 202 |
* Less_Parser: Returning a URI from `SetImportDirs()` callbacks is now optional. (Timo Tijhof) |
| 203 |
|
| 204 |
## v4.0.0 |
| 205 |
|
| 206 |
* Remove support for PHP 7.2 and 7.3. Raise requirement to PHP 7.4+. |
| 207 |
* Remove support for `cache_method=php` and `cache_method=var_export`, only the faster and more secure `cache_method=serialize` is now available. The built-in cache remains disabled by default. |
| 208 |
* Fix `url(#myid)` to be treated as absolute URL. [T331649](https://phabricator.wikimedia.org/T331688) |
| 209 |
* Fix "Undefined property" PHP 8.1 warning when `calc()` is used with CSS `var()`. [T331688](https://phabricator.wikimedia.org/T331688) |
| 210 |
* Less_Parser: Improve performance by removing MatchFuncs and NewObj overhead. (Timo Tijhof) |
| 211 |
|
| 212 |
## v3.2.1 |
| 213 |
|
| 214 |
* Tree_Ruleset: Fix support for nested parent selectors (Timo Tijhof) [T204816](https://phabricator.wikimedia.org/T204816) |
| 215 |
* Fix ParseError when interpolating variable after colon in selector (Timo Tijhof) [T327163](https://phabricator.wikimedia.org/T327163) |
| 216 |
* Functions: Fix "Undefined property" warning on bad minmax arg |
| 217 |
* Tree_Call: Include previous exception when catching functions (Robert Frunzke) |
| 218 |
|
| 219 |
## v3.2.0 |
| 220 |
|
| 221 |
* Fix "Implicit conversion" PHP 8.1 warnings (Ayokunle Odusan) |
| 222 |
* Fix "Creation of dynamic property" PHP 8.2 warnings (Bas Couwenberg) |
| 223 |
* Fix "Creation of dynamic property" PHP 8.2 warnings (Rajesh Kumar) |
| 224 |
* Tree_Url: Add support for "Url" type to `Parser::getVariables()` (ciroarcadio) [#51](https://github.com/wikimedia/less.php/pull/51) |
| 225 |
* Tree_Import: Add support for importing URLs without file extension (Timo Tijhof) [#27](https://github.com/wikimedia/less.php/issues/27) |
| 226 |
|
| 227 |
## v3.1.0 |
| 228 |
|
| 229 |
* Add PHP 8.0 support: Drop use of curly braces for sub-string eval (James D. Forrester) |
| 230 |
* Make `Directive::__construct` $rules arg optional (fix PHP 7.4 warning) (Sam Reed) |
| 231 |
* ProcessExtends: Improve performance by using a map for selectors and parents (Andrey Legayev) |
| 232 |
|
| 233 |
## v3.0.0 |
| 234 |
|
| 235 |
* Raise PHP requirement from 7.1 to 7.2.9 (James Forrester) |
| 236 |
|
| 237 |
## v2.0.0 |
| 238 |
|
| 239 |
* Relax PHP requirement down to 7.1, from 7.2.9 (Franz Liedke) |
| 240 |
* Reflect recent breaking changes properly with the semantic versioning (James Forrester) |
| 241 |
|
| 242 |
## v1.8.2 |
| 243 |
|
| 244 |
* Require PHP 7.2.9+, up from 5.3+ (James Forrester) |
| 245 |
* release: Update Version.php with the current release ID (COBadger) |
| 246 |
* Fix access array offset on value of type null (Michele Locati) |
| 247 |
* Fix test suite on PHP 7.4 (Sergei Morozov) |
| 248 |
|
| 249 |
## v1.8.1 |
| 250 |
|
| 251 |
* Another PHP 7.3 compatibility tweak |
| 252 |
|
| 253 |
## v1.8.0 |
| 254 |
|
| 255 |
Library forked by Wikimedia, from [oyejorge/less.php](https://github.com/oyejorge/less.php). |
| 256 |
|
| 257 |
* Supports up to PHP 7.3 |
| 258 |
* No longer tested against PHP 5, though it's still remains allowed in `composer.json` for HHVM compatibility |
| 259 |
* Switched to [semantic versioning](https://semver.org/), hence version numbers now use 3 digits |
| 260 |
|
| 261 |
## v1.7.0.13 |
| 262 |
|
| 263 |
* Fix composer.json (PSR-4 was invalid) |
| 264 |
|
| 265 |
## v1.7.0.12 |
| 266 |
|
| 267 |
* set bin/lessc bit executable |
| 268 |
* Add `gettingVariables` method to `Less_Parser` |
| 269 |
|
| 270 |
## v1.7.0.11 |
| 271 |
|
| 272 |
* Fix realpath issue (windows) |
| 273 |
* Set Less_Tree_Call property back to public ( Fix 258 266 267 issues from oyejorge/less.php) |
| 274 |
|
| 275 |
## v1.7.0.10 |
| 276 |
|
| 277 |
* Add indentation option |
| 278 |
* Add `optional` modifier for `@import` |
| 279 |
* Fix $color in Exception messages |
| 280 |
* take relative-url into account when building the cache filename |
| 281 |
* urlArgs should be string no array() |
| 282 |
* fix missing on NameValue type [#269](https://github.com/oyejorge/less.php/issues/269) |
| 283 |
|
| 284 |
## v1.7.0.9 |
| 285 |
|
| 286 |
* Remove space at beginning of Version.php |
| 287 |
* Revert require() paths in test interface |