Skip to content

v4.0.0

Latest

Choose a tag to compare

@janedbal janedbal released this 26 Aug 15:00
7e836db

Breaking changes:

  • PHP 8.4+ is now required (#36)
  • New DOM API: XmlLoader::loadXml() now returns Dom\XMLDocument and XmlLoader::loadHtml() returns Dom\HTMLDocument, previously both returned DOMDocument (#36)
  • HTML5 parser: loadHtml() now uses the spec-compliant HTML5 parser of Dom\HTMLDocument, the parse tree can differ from the legacy libxml2 parser for malformed markup (#36)

Migration:

  • Replace DOMDocument type-hints of loader results with Dom\XMLDocument / Dom\HTMLDocument
  • Check your DOM traversal code against the new DOM API, some legacy methods behave differently or are not available
  • Verify HTML parsing of malformed markup, the HTML5 parser can produce a different tree

Improvements:

  • XmlException::__construct() now accepts a $previous throwable (#36)
  • Tests migrated from nette/tester to PHPUnit (#37)