| 1 |
# Release History |
| 2 |
|
| 3 |
## zest-css 3.0.1 (2024-03-11) |
| 4 |
* Bug fix: recursive CSS selectors like `:has` and `:is` can now use |
| 5 |
custom selectors. |
| 6 |
* Bug fix: selector for empty attributes now works correctly. |
| 7 |
* Ensure ::getElementsByTagName() and ::getElementsByClassName() work |
| 8 |
correctly on tag or class names that contain 'special characters' |
| 9 |
that need to be escaped in a CSS query (T357812). |
| 10 |
* Improvements to test cases. |
| 11 |
* Dependency updates (mediawiki/mediawiki-phan-config, phpunit, |
| 12 |
mediawiki/mediawiki-codesniffer) |
| 13 |
|
| 14 |
## zest-css 3.0.0 (2023-02-27) |
| 15 |
* Drop PHP 7.2 and PHP 7.3 support. |
| 16 |
* PHP 8 compatibility fixes. |
| 17 |
* Dependency updates. |
| 18 |
|
| 19 |
## zest-css 2.0.2 (2021-10-14) |
| 20 |
* Update wikimedia/remex-html to 2.3.2 (dev dependency) |
| 21 |
* Add a compilation cache to speed up repeated matches. |
| 22 |
|
| 23 |
## zest-css 2.0.1 (2021-08-07) |
| 24 |
* Bug fix: in some cases the ` ` and `>` combinators, as well as the |
| 25 |
`:dir` and `:lang` selectors, could attempt to match against a |
| 26 |
DOMDocument or DOMDocumentFragment instead of a DOMElement. |
| 27 |
|
| 28 |
## zest-css 2.0.0 (2021-07-22) |
| 29 |
* Dependency updates |
| 30 |
* API changes: |
| 31 |
* The context argument ("scoping root") can now be a DOMDocumentFragment |
| 32 |
as well as the previously-allowed DOMDocument or DOMElement. |
| 33 |
* Add optional "options" argument to main entry points to allow passing |
| 34 |
information to custom selectors, as well as to opt in to disable certain |
| 35 |
workaround and enable additional features. Current "options" keys include: |
| 36 |
* `standardsMode`: set to `true` for a spec-compliant DOM implementation |
| 37 |
* `getElementsById`: pass a `callable(DOMNode,string):array` if your |
| 38 |
DOM implementation can index multiple elements with the same id, or |
| 39 |
`true` to force a slow full-tree search to guarantee that id selectors |
| 40 |
can return multiple results. |
| 41 |
* Return types which were DOMNodeList have been changed to generic array |
| 42 |
types, to accomodate workarounds needed by the PHP dom library. |
| 43 |
* The `ZestInst::getElementsById()`, `::getElementsByTagName()`, and |
| 44 |
`::getElementsByClassName()` methods are now virtual (not static) to |
| 45 |
allow clients to subclass and override them if more efficient |
| 46 |
implementations are available. |
| 47 |
* Clients can now subclass ZestInst and override |
| 48 |
`ZestInst::newBadSelectorException()` in order to customize the exception |
| 49 |
that is thrown when a selector parse error occurs. |
| 50 |
* Clients can now subclass ZestInst and override |
| 51 |
`ZestInst::isStandardsMode()` in order to force Zest into standards mode |
| 52 |
(or not). |
| 53 |
* Sort results in document order in standards mode. |
| 54 |
* Support `:scope` selector |
| 55 |
* Bug fixes to ~= operator, which now accepts non-space whitespace as a |
| 56 |
separator and is stricter about match targets containing whitespace |
| 57 |
* Rudimentary namespace selector support: `*|TAG` and `|TAG`. |
| 58 |
|
| 59 |
## zest-css 1.1.5 (2021-03-23) |
| 60 |
* Dependency updates |
| 61 |
* Strip strict type checks from API so this library can be used with |
| 62 |
3rd-party DOM implementations |
| 63 |
|
| 64 |
## zest-css 1.1.4 (2021-01-29) |
| 65 |
* Dependency updates |
| 66 |
* Make tests pass on PHP 8 |
| 67 |
|
| 68 |
## zest-css 1.1.3 (2020-04-20) |
| 69 |
* Fix case-insensitive attribute value matching |
| 70 |
* Various dependency updates |
| 71 |
|
| 72 |
## zest-css 1.1.2 (2019-04-09) |
| 73 |
* Bug fix in ::first-child selector |
| 74 |
|
| 75 |
## zest-css 1.1.1 (2019-03-19) |
| 76 |
* Improve documentation and update copyright information |
| 77 |
|
| 78 |
## zest-css 1.1.0 (2019-03-15) |
| 79 |
* Expose getElementsById / getElementsByTagName |
| 80 |
* Allow passing options to Remex in test helpers |
| 81 |
|
| 82 |
## zest-css 1.0.0 (2019-03-13) |
| 83 |
* Initial release. |