Skip to content

HTMLdoc v1.7.0

Compare
Choose a tag to compare
@hexydec hexydec released this 19 May 09:15
· 52 commits to master since this release

This release fixes a number of bugs and make more use of type hints and docblocks for improved ease of development and stability:

  • Added @property tags for htmldoc::__get() and htmldoc::__set()
  • Updated htmldoc::offsetSet() to assume that there is always an index
  • comment::minify() now checks that there is content
  • custom::__construct() now check that $tagName is not null
  • Tightened properties in tag
  • Fixed bug in tag::append() where clones were not spliced correctly
  • tag::getIndex() now check that the parent is not null
  • Fixed some typing issues in tag::minify()
  • Fixed return value issue in tag::attr()
  • Fixed some potential typing errors
  • Fixed issue in tag::minify() where the parent was not checked for null
  • Updated some incorrect types in phpDoc tags
  • Moved code that parses CSS selectors into its own class
  • Updated htmldoc::find() to use the new class
  • Updated htmldoc::minify() to move the code that sorts attributes into its own method
  • Updated htmldoc::open(), htmldoc::getCharsetFromHtml(), and htmldoc::minify() to reduce cognitive complexity
  • Updated htmldoc::save() to return the compiled code instead of true if saved, as it returns the code if no file is specified
  • Updated tests
  • Fixed bug in htmldoc::offsetGet() and htmldoc::current() where it returned the child object instead of a new htmldoc object containing the child node
  • Updated signature of ArrayAccess methods to match the parent
  • Fixed PHP 7.4 compatibility issue where the type hint mixed was not introduced until PHP 8
  • Added #[\ReturnTypeWillChange] hint to htmldoc::offsetGet() and htmldoc::__get()