All Versions
41
Latest Version
Avg Release Cycle
190 days
Latest Release
120 days ago

Changelog History
Page 1

  • v9.4.0 Changes

    June 18, 2026

    What's Changed

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ Deprecate support for PHP 7.2 and 7.3 (#1565)

    ๐Ÿ›  Fixed

    • ๐Ÿ‘ Allow CSS containing only whitespace or comments (#1593)
    • ๐Ÿ“œ Only allow strings as LineName components (#1590)

    Full Changelog : v9.3.0...v9.4.0

  • v9.3.0 Changes

    March 03, 2026

    โž• Added

    • โž• Add support for modern CSS at-rules: @layer, @scope, and @starting-style (#1549)

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ Avoid double autoloading of class aliases (#1552)

    ๐Ÿ†• New Contributors

    Full Changelog : v9.2.0...v9.3.0

  • v9.2.0 Changes

    February 21, 2026

    โž• Added

    • โž• Add OutputFormat::setSpaceAroundSelectorCombinator() (#1504)
    • โž• Add support for escaped quotes in the selectors (#1485, #1489)
    • ๐Ÿ‘ป Provide line number in exception message for mismatched parentheses in
      ๐Ÿ“œ selector (#1435)
    • โž• Add support for CSS container queries (#1400)

    ๐Ÿ”„ Changed

    • ๐Ÿ“œ RuleSet\RuleContainer is renamed to RuleSet\DeclarationList (#1530, #1539)
    • Methods like setRule() in RuleSet and DeclarationBlock have been renamed
      ๐Ÿ“œ to setDeclaration(), etc. (#1521)
    • Rule\Rule class is renamed to Property\Declaration
      ๐Ÿ“œ (#1508, #1512, #1513, #1522)
    • Rule::setRule() and getRule() are replaced with setPropertyName() and
      ๐Ÿ“œ getPropertyName() (#1506)
    • Selector is now represented as a sequence of Selector\Component objects
      which can be accessed via getComponents(), manipulated individually, or set
      ๐Ÿ“œ via setComponents() (#1478, #1486, #1487, #1488, #1494, #1496, #1536, #1537)
    • ๐Ÿ‘ป Selector::setSelector() and Selector constructor will now throw exception
      ๐Ÿ“œ upon provision of an invalid selectior (#1498, #1502)
    • ๐Ÿ“œ Clean up extra whitespace in CSS selector (#1398)
    • The array keys passed to DeclarationBlock::setSelectors() are no longer
      ๐Ÿ“œ preserved (#1407)

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ RuleSet\RuleContainer is deprecated; use RuleSet\DeclarationList instead
      ๐Ÿ“œ (#1530)
    • ๐Ÿ—„ Methods like setRule() in RuleSet and DeclarationBlock are deprecated;
      ๐Ÿ“œ there are direct replacements such as setDeclaration() (#1521)
    • ๐Ÿ—„ Rule\Rule class is deprecated; Property\Declaration is a direct
      ๐Ÿ“œ replacement (#1508)
    • ๐Ÿ—„ Rule::setRule() and getRule() are deprecated and replaced with
      ๐Ÿ“œ setPropertyName() and getPropertyName() (#1506, #1519)

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ Do not escape characters that do not need escaping in CSS string (#1444)
    • ๐Ÿ“œ Reject selector comprising only whitespace (#1433)
    • ๐Ÿ‘Œ Improve recovery parsing when a rogue } is encountered (#1425, #1426)
    • ๐Ÿ“œ Parse comment(s) immediately preceding a selector (#1421, #1424)
    • ๐Ÿ“œ Parse consecutive comments (#1421)
    • ๐Ÿ‘Œ Support attribute selectors with values containing commas in
      ๐Ÿ“œ DeclarationBlock::setSelectors() (#1419)
    • ๐Ÿ‘ Allow removeDeclarationBlockBySelector() to be order-insensitve (#1406)
    • ๐Ÿ›  Fix parsing of calc expressions when a newline immediately precedes or
      ๐Ÿ“œ follows a + or - operator (#1399)
    • ๐Ÿ“œ Use typesafe versions of PHP functions (#1379, #1380, #1382, #1383, #1384)

    ๐Ÿ†• New Contributors

    Full Changelog : v9.1.0...v9.2.0

  • v9.1.0 Changes

    September 14, 2025

    โž• Added

    • โž• Add support for PHP 8.5 (#1355)

    ๐Ÿ›  Fixed

    • ๐Ÿ‘Œ Improve performance of selector validation
      ๐Ÿ“œ (avoiding silent PCRE catastrophic failure) (#1372)
    • ๐Ÿ“œ Use typesafe versions of PHP functions (#1368, #1370)
  • v9.0.0 Changes

    July 27, 2025

    โž• Added

    • ๐Ÿ“œ Interface RuleContainer for RuleSet Rule manipulation methods (#1256)
    • ๐Ÿ‘ Partial support for CSS Color Module Level 4:

      • rgb and rgba, and hsl and hsla are now aliases (#797)
      • Parse color functions that use the "modern" syntax (#800)
      • Render RGB functions with "modern" syntax when required (#840)
      • Support none as color function component value (#859)
    • โž• Add a class diagram to the README (#482)

    • โž• Add more tests (#449)

    ๐Ÿ”„ Changed

    • DeclarationBlock no longer extends RuleSet and instead has a RuleSet as
      ๐Ÿ“œ a property; use getRuleSet() to access it directly (#1194)
    • 0๏ธโƒฃ The default line (and column) number is now null (not zero) (#1288)
    • setPosition() (in Rule and other classes) now has fluent interface,
      ๐Ÿ“œ returning itself (#1259)
    • ๐Ÿšš RuleSet::removeRule() now only allows Rule as the parameter
      (implementing classes are AtRuleSet and DeclarationBlock);
      ๐Ÿšš use removeMatchingRules() or removeAllRules() for other functions (#1255)
    • RuleSet::getRules() and getRulesAssoc() now only allow string or null
      as the parameter (implementing classes are AtRuleSet and DeclarationBlock)
      ๐Ÿ“œ (#1253)
    • ๐ŸŽ‰ Initialize KeyFrame properties to sensible defaults (#1146)
    • ๐Ÿ“œ Make OutputFormat final (#1128)
    • ๐Ÿ“œ Make Selector a Renderable (#1017)
    • ๐Ÿ“œ Only allow string for some OutputFormat properties (#885)
    • ๐Ÿ‘‰ Use more native type declarations and strict mode
      ๐Ÿ“œ (#641, #772, #774, #778, #804, #841, #873, #875, #891, #922, #923, #933, #958,
      ๐Ÿ“œ #964, #967, #1000, #1044, #1134, #1136, #1137, #1139, #1140, #1141, #1145,
      ๐Ÿ“œ #1162, #1163, #1166, #1172, #1174, #1178, #1179, #1181, #1183, #1184, #1186,
      ๐Ÿ“œ #1187, #1190, #1192, #1193, #1203)
    • โž• Add visibility to all class/interface constants (#469)

    โœ‚ Removed

    • โœ‚ Remove getLineNo() from these classes (use getLineNumber() instead):
      Comment, CSSList, SourceException, Charset, CSSNamespace, Import,
      ๐Ÿ“œ Rule, DeclarationBlock, RuleSet, CSSFunction, Value (#1258)
    • โœ‚ Remove Rule::getColNo() (use getColumnNumber() instead) (#1287)
    • Passing a string as the first argument to getAllValues() is no longer
      ๐Ÿ‘Œ supported and will not work;
      ๐Ÿ“œ the search pattern should now be passed as the second argument (#1243)
    • Passing a Boolean as the second argument to getAllValues() is no longer
      ๐Ÿ‘Œ supported and will not work; the flag for searching in function arguments
      ๐Ÿ“œ should now be passed as the third argument (#1243)
    • โœ‚ Remove __toString() (#1046)
    • โฌ‡๏ธ Drop magic method forwarding in OutputFormat (#898)
    • โฌ‡๏ธ Drop atRuleArgs() from the AtRule interface (#1141)
    • โœ‚ Remove OutputFormat::get() and ::set() (#1108, #1110)
    • โฌ‡๏ธ Drop special support for vendor prefixes (#1083)
    • โœ‚ Remove the IE hack in Rule (#995)
    • โฌ‡๏ธ Drop getLineNo() from the Renderable interface (#1038)
    • โœ‚ Remove OutputFormat::level() (#874)
    • โœ‚ Remove expansion of shorthand properties (#838)
    • โœ‚ Remove Parser::setCharset/getCharset (#808)
    • โœ‚ Remove Rule::getValues() (#582)
    • โœ‚ Remove Rule::setValues() (#562)
    • โœ‚ Remove Document::getAllSelectors() (#561)
    • โœ‚ Remove DeclarationBlock::getSelector() (#559)
    • โœ‚ Remove DeclarationBlock::setSelector() (#560)
    • โฌ‡๏ธ Drop support for PHP < 7.2 (#420)

    ๐Ÿ›  Fixed

    • โœ‚ Remove trailing semicolon from declaration blocks with 'compact'
      ๐Ÿ“œ OutputFormat (#1345)
    • ๐Ÿ“œ Parse selector functions (like :not) with comma-separated arguments (#1292)
    • ๐Ÿ“œ Parse quoted attribute selector value containing comma (#1323)
    • ๐Ÿ‘ Allow comma in selectors (e.g. :not(html, body)) (#1293)
    • Insert Rule before sibling even with different property name
      ๐Ÿ“œ (in RuleSet::addRule()) (#1270)
    • Ensure RuleSet::addRule() sets non-negative column number when sibling
      ๐Ÿ“œ provided (#1268)
    • ๐Ÿ“œ Don't render rgb colors with percentage values using hex notation (#803)

    ๐Ÿ“š Documentation

    • โž• Add an API and deprecation policy (#720)

    ๐Ÿš€ @ziegenberg is a new contributor to this release and did a lot of the heavy
    lifting. Thanks! โค๏ธ

  • v8.9.0 Changes

    July 11, 2025

    โž• Added

    • ๐Ÿšš RuleSet::removeMatchingRules() method
      ๐Ÿ“œ (for the implementing classes AtRuleSet and DeclarationBlock) (#1249)
    • ๐Ÿšš RuleSet::removeAllRules() method
      ๐Ÿ“œ (for the implementing classes AtRuleSet and DeclarationBlock) (#1249)
    • โž• Add Interface CSSElement (#1231)
    • Methods getLineNumber and getColumnNumber which return a nullable int
      for the following classes:
      Comment, CSSList, SourceException, Charset, CSSNamespace, Import,
      ๐Ÿ“œ Rule, DeclarationBlock, RuleSet, CSSFunction, Value (#1225, #1263)
    • Positionable interface for CSS items that may have a position
      ๐Ÿ“œ (line and perhaps column number) in the parsed CSS (#1221)

    ๐Ÿ”„ Changed

    • Parameters for getAllValues() are deconflated, so it now takes three (all
      optional), allowing $element and $ruleSearchPattern to be specified
      ๐Ÿ“œ separately (#1241)
    • Implement Positionable in the following CSS item classes:
      Comment, CSSList, SourceException, Charset, CSSNamespace, Import,
      ๐Ÿ“œ Rule, DeclarationBlock, RuleSet, CSSFunction, Value (#1225)

    ๐Ÿ—„ Deprecated

    • ๐Ÿ‘Œ Support for PHP < 7.2 is deprecated; version 9.0 will require PHP 7.2 or later
      ๐Ÿ“œ (#1264)
    • ๐Ÿšš Passing a string or null to RuleSet::removeRule() is deprecated
      (implementing classes are AtRuleSet and DeclarationBlock);
      ๐Ÿšš use removeMatchingRules() or removeAllRules() instead (#1249)
    • ๐Ÿ—„ Passing a Rule to RuleSet::getRules() or getRulesAssoc() is deprecated,
      affecting the implementing classes AtRuleSet and DeclarationBlock
      ๐Ÿ“œ (call e.g. getRules($rule->getRule()) instead) (#1248)
    • ๐Ÿ—„ Passing a string as the first argument to getAllValues() is deprecated;
      ๐Ÿ“œ the search pattern should now be passed as the second argument (#1241)
    • ๐Ÿ—„ Passing a Boolean as the second argument to getAllValues() is deprecated;
      the flag for searching in function arguments should now be passed as the third
      ๐Ÿ“œ argument (#1241)
    • ๐Ÿ—„ getLineNo() is deprecated in these classes (use getLineNumber() instead):
      Comment, CSSList, SourceException, Charset, CSSNamespace, Import,
      ๐Ÿ“œ Rule, DeclarationBlock, RuleSet, CSSFunction, Value (#1225, #1233)
    • ๐Ÿ—„ Rule::getColNo() is deprecated (use getColumnNumber() instead)
      ๐Ÿ“œ (#1225, #1233)
    • Providing zero as the line number argument to Rule::setPosition() is
      ๐Ÿ—„ deprecated (pass null instead if there is no line number) (#1225, #1233)

    ๐Ÿ›  Fixed

    • Set line number when RuleSet::addRule() called with only column number set
      ๐Ÿ“œ (#1265)
    • ๐Ÿ“œ Ensure first rule added with RuleSet::addRule() has valid position (#1262)
  • v8.8.0 Changes

    March 23, 2025

    โž• Added

    • ๐Ÿ“œ OutputFormat properties for space around specific list separators (#880)

    ๐Ÿ”„ Changed

    • ๐Ÿ“œ Mark the OutputFormat constructor as @internal (#1131)
    • ๐Ÿ“œ Mark OutputFormatter as @internal (#896)
    • ๐Ÿ“œ Mark Selector::isValid() as @internal (#1037)
    • ๐Ÿ“œ Mark parsing-related methods of most CSS elements as @internal (#908)
    • ๐Ÿ“œ Mark OutputFormat::nextLevel() as @internal (#901)
    • ๐Ÿ“œ Make all non-private properties @internal (#886)

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ Deprecate extending OutputFormat (#1131)
    • ๐Ÿ—„ Deprecate OutputFormat::get() and ::set() (#1107)
    • ๐Ÿ—„ Deprecate support for -webkit-calc and -moz-calc (#1086)
    • ๐Ÿ—„ Deprecate magic method forwarding from OutputFormat to OutputFormatter
      ๐Ÿ“œ (#894)
    • ๐Ÿ—„ Deprecate __toString() (#1006)
    • ๐Ÿ—„ Deprecate greedy calculation of selector specificity (#1018)
    • ๐Ÿ—„ Deprecate the IE hack in Rule (#993, #1003)
    • ๐Ÿ“œ OutputFormat properties for space around list separators as an array (#880)
    • ๐Ÿ—„ Deprecate OutputFormat::level() (#870)

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ Include comments for all rules in declaration block (#1169)
    • ๐Ÿ“œ Render rules in line and column number order (#1059)
    • ๐Ÿ“œ Create Size with correct types in expandBackgroundShorthand (#814)
    • ๐Ÿ“œ Parse @font-face src property as comma-delimited list (#794)
  • v8.7.0 Changes

    October 27, 2024

    โž• Added

    ๐Ÿ”„ Changed

    • ๐Ÿ“œ Mark parsing-internal classes and methods as @internal (#711)
    • ๐Ÿ“œ Block installations on unsupported higher PHP versions (#691)

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ Deprecate the expansion of shorthand properties (#719)
    • ๐Ÿ—„ Deprecate Parser::setCharset() and Parser::getCharset() (#703)
  • v8.6.0 Changes

    July 01, 2024

    โž• Added

    • ๐Ÿ‘Œ Support arithmetic operators in CSS function arguments (#607)
    • โž• Add support for inserting an item in a CSS list (#545)
    • โž• Add support for the dvh, lvh and svh length units (#415)

    ๐Ÿ”„ Changed

    • ๐Ÿ‘Œ Improve performance of Value::parseValue with many delimiters by refactoring to remove array_search() (#413)
  • v8.5.2 Changes

    June 28, 2024

    ๐Ÿ”„ Changed

    • ๐Ÿ“œ Mark all class constants as @internal (#500)

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fix undefined local variable in CalcFunction::parse() (#593)