Skip to content

Releases: hexydec/htmldoc

HTMLdoc v1.8.3

30 Dec 22:22
Compare
Choose a tag to compare

This release fixes a bug:

  • Fixed #11, removed feDiffuseLighting and feMerge from the singletons list

HTMLdoc v1.8.2

18 Dec 09:11
Compare
Choose a tag to compare

This update fixes some bugs, improves syntax, and updates dependencies:

  • Updated require to be used as a keyword instead of a function
  • Slashed library functions
  • Updated readme.md
  • Fixed bug in tag::getIndex() where it was generating the indexes from only the tag objects, meaning that when there were other node types such as text nodes, the index would be out of step, causing nodes to be inserted into the wrong position
  • The CSS and Javascript cache directory is now created recursively
  • Fixed issue #8 where parse_url() is unreliable for relative URIs
  • Fixed issue #10 where the strikethrough element was missing from the list of inline elements
  • Added PHPstan
  • Added tests

HTMLdoc v1.8.1

25 May 19:19
Compare
Choose a tag to compare

This release fixes some bugs and adds some minor new features to address external usage issues:

  • Fixed bug in htmldoc::children() where it selected the root nodes instead of their children
  • Updated htmldoc::collection() to return itself instead of void
  • Added htmldoc::parent() to get the parents of each item in the collection
  • Added tests and updated htmldoc::children() test as this was incorrect
  • Added htmldoc::tag() to enable the tag name to be retrieved from the first item in a collection
  • Added tests and updated htmldoc::children() test as this was incorrect
  • Updated tag.php to use str_contains() instead of mb_strpos() where possible
  • Fixed some return value issues in htmldoc
  • Updated composer dependencies

HTMLdoc v1.8.0

11 Feb 21:23
Compare
Choose a tag to compare

This release fixes a number of issues and removes support for PHP 7.4:

  • Fixed issues handling empty attributes in tag::minify(), where the code expected the attribute value to be a string, but if only the attribute name appears, its value would be null
  • Improved logic in tag::minify()
  • Fixed bug in selector::parse() where when it hit a bracketclose it didn't exit the loop, causing it to parse too much
  • Improved tag::find() by making it do work out of a loop
  • Added test to findHtmldocTest.php to check it can find items where :not(:pseudo-selector)
  • Updated type hints to correct types where #[\ReturnTypeWillChange] as the software now only supports PHP 8.0+
  • Added type hints where mixed is required
  • Added union type hints on arguments and return types where missing
  • Added ability to handle sibling selectors to tag::find()
  • Updated htmldoc::collection() to only store unique tags, as sibling find() operations can produce the same node multiple times
  • Updated composer dependencies

HTMLdoc v1.7.4

14 Nov 09:42
Compare
Choose a tag to compare

This is a maintenance release that updates JSlite to fix some Javascript parsing issues.

HTMLdoc v1.7.3

26 Sep 11:21
Compare
Choose a tag to compare

This release fixes a return type issue and updates composer:

  • In later versions of PHP, the return type of iterator::key() is now mixed. For now this has been marked as #ReturnTypeWillChange for PHP 7.4 compatibility
  • Updated composer dependencies
  • Updated keywords in composer.json

HTMLdoc v1.7.2

15 Sep 21:46
Compare
Choose a tag to compare

This release fixes some bugs and improves type hinting and docblocks:

  • Fixed issue in htmldoc::__clone() where in PHP 7.4 it must not specify a return type
  • Updated attribute selectors to fix bugs with how attributes are handled when they are set with no value or with no equals
  • Fixed issue in $= comparison attribute selector where it didn't search for the last occurrence
  • Added new comparison operators in attribute selectors -|= and ~=
  • Fixed bug in text class where there was no set() method to enable the parent object to be set which is required if you add HTML that has textnodes at the root level
  • Fixed issue in autoload.php where the return type was incorrect
  • Updated and added tests
  • Fixed issues with docblocks
  • Added stability badge to readme.md

HTMLdoc v1.7.1

19 May 15:57
Compare
Choose a tag to compare

This is just a bug fix to correct usage of the mixed type hint, which is not compatible with PHP 7.4. Also updated dependencies as CSSdoc had the same issue.

HTMLdoc v1.7.0

19 May 09:15
Compare
Choose a tag to compare

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()

HTMLdoc v1.6.1

04 Mar 23:38
Compare
Choose a tag to compare

Added typed properties which removes support for PHP 7.3.
Updated dependencies.