Releases: hexydec/htmldoc
HTMLdoc v1.8.6
This is a maintenance release that fixes some issues and updates dependencies:
- Updated design of test interface
- Optimised how the urlskip setting is handled in
tag::minify()
- Updated
tag
class to usestr_starts_with()
- Updated
tag::hasAttribute()
to check the values case-insensitively - Added some arabic content with some HTML around it in tests
- Updated singleton list to remove deprecated tags
- Updated boolean attributes list to remove deprecated items and add new attributes
- Reworked
htmldoc::save()
to implement charset conversion in a more robust way - Fixed missing null definition in method argument
- Updated dependencies
HTMLdoc v1.8.3
This release fixes a bug:
- Fixed #11, removed
feDiffuseLighting
andfeMerge
from the singletons list
HTMLdoc v1.8.2
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
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 ofvoid
- 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 usestr_contains()
instead ofmb_strpos()
where possible - Fixed some return value issues in
htmldoc
- Updated composer dependencies
HTMLdoc v1.8.0
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 abracketclose
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 siblingfind()
operations can produce the same node multiple times - Updated composer dependencies
HTMLdoc v1.7.4
This is a maintenance release that updates JSlite to fix some Javascript parsing issues.
HTMLdoc v1.7.3
This release fixes a return type issue and updates composer:
- In later versions of PHP, the return type of
iterator::key()
is nowmixed
. 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
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
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
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 forhtmldoc::__get()
andhtmldoc::__set()
- Updated
htmldoc::offsetSet()
to assume that there is always an index comment::minify()
now checks that there is contentcustom::__construct()
now check that$tagName
is notnull
- Tightened properties in
tag
- Fixed bug in
tag::append()
where clones were not spliced correctly tag::getIndex()
now check that the parent is notnull
- 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 fornull
- 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()
, andhtmldoc::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()
andhtmldoc::current()
where it returned the child object instead of a newhtmldoc
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 tohtmldoc::offsetGet()
andhtmldoc::__get()