NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1063 most downloaded on Packagist
A library for comparing two HTML files/snippets and highlighting the differences using simple HTML.
Latest stable
v0.1.17
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 4 weeks to 1.9 years
Nearly every release is documented
notes for 32 of 32 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
33 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
Fix: Removed some more E_DEPRECATED error explicit nullable types by @richardbrinkman in https://github.com/caxy/php-htmldiff/pull/133
Full Changelog: https://github.com/caxy/php-htmldiff/compare/v0.1.16...v0.1.17
php 8.2: Deprecated function mb_convert_encoding() by @s-ayers in https://github.com/caxy/php-htmldiff/pull/125
Full Changelog: https://github.com/caxy/php-htmldiff/compare/v0.1.15...v0.1.16
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Fix #120: deprecated HTML-ENTITIES encoding by @richardbrinkman in https://github.com/caxy/php-htmldiff/pull/121
Full Changelog: https://github.com/caxy/php-htmldiff/compare/v0.1.14...v0.1.15
Deprecated all setSpecialCaseTags() config calls. There is no replacement, but the current expectation is that nobody ever used these calls anyway.
This release mainly removed everything that is related to the concept of special-case-tags. This was adopted from the original library by rashid2538 that this fork is based on.
The feature tried to wrap the special tags in an extra <ins / del class='mod'> tag.
However, this never really worked properly (the closing tag was not always added to the diff output) and usually ended up crippling the HTML.
Given the feature never really worked, and there is no clear use-case for it, I decided to remove it and fix issue 106 and issue 69 in the process where it was sometimes impossible to diff html that contained these special tags or unexpected extra tags got added to the output.
In case you really needed this feature, please open an issue explaining your use-case, in that case this decision can be revisited.
Add .gitattributes file to exclude demo and tests from the exported zip package to reduce package size when installed via composer (#86 - @danepowell
.gitattributes file to exclude demo and tests from the exported zip package to reduce package size when installed via composer (#86 - @danepowell ).gitattributes file to exclude demo and tests from the exported zip package to reduce package size when installed via composer (#86 - @danepowell). This means demo/ and tests/ will no longer be included in the installed package files. In theory this shouldn't be a breaking change, but it could be if you are depending on or referencing any files from those directories.Word parser is rebuild to improve performance by 98% (according to xhprof profiler) and reducing code complexity.
The changes to the list diffing are substantial, and we have tested as much as possible, to make sure the output stays the same between this version a
The changes to the list diffing are substantial, and we have tested as much as possible, to make sure the output stays the same between this version and the previous version.
If there are issues cropping up with list diffing after updating to this version feel free to open an issue
In order to be compatible with PHP8 we had to upgrade some vendor packages.
In order to be compatible with PHP8 we had to upgrade some vendor packages.
Since these vendor packages have dropped support for older versions of PHP we had todo the same, therefore this version is not compatible anymore with PHP versions prior to 7.3.
In case you are not able to upgrade your PHP version, please pin version v0.1.9 of php-htmldiff in your composer config.
Issue \#77: Performance Fixes \#81 (SavageTiger)
Resolve PHP 7.3 compatibility issue to fix \#79 \#80 (irkallacz)
Implemented enhancements:
Closed issues:
Fix issues with unicode characters (@iluuu1994 #71, #72)
Bugfixes:
Bug - bad comparison between words containing accented characters \#66
Closed issues:
Merged pull requests:
[Bug] HTMLPurifier Permission Fix (#63) (@snebes)
[Bug] HTMLPurifier Permission Fix (#63) (@snebes)
Fixed bugs:
Closed issues:
Merged pull requests:
[BUG] changes the [] arrays to array() as it does not work in php 5.3 (@myfriend12)
[BUG] changes the [] arrays to array() as it does not work in php 5.3 (@myfriend12)
Merged pull requests:
Fixed a crash when comparing two table columns against each other that contained a regular space character.
Bug fixes
Features and Enhancements:
Thank you @SavageTiger again for the drastic performance improvements and the Release Notes!
Implemented enhancements:
Closed issues:
Merged pull requests:
Added prepare step to the build() method to prevent HTMLPurifier config object from existing in different states. (Resolves #51)
Bug fixes
Features and Enhancements:
Thank you @SavageTiger for your bugfix contribution, and for the Release Notes!
Implemented enhancements:
Fixed bugs:
Closed issues:
Merged pull requests:
Update TableDiff HTMLPurifier Initialization #35 (dbergunder)
Features and Enhancements:
Miscellaneous:
Implemented enhancements:
Merged pull requests:
Allow caching of the calculated diffs using a doctrine cache provider #33 (jschroed91)
Features and Enhancements:
Implemented enhancements:
Merged pull requests:
New Feature: Table Diffing Enhancement: Detecting link changes
New Feature: Table Diffing Enhancement: Detecting link changes
Merged pull requests:
Fix HtmlDiff matching logic skipping over single word matches \#25 (jschroed91)
Fixed bugs:
Misc. list diffing updates and fixes \#24 (jschroed91)
Fixed bugs:
feature-list\_diffing-new \#20 (adamCaxy)
Feature list diffing new \#19 (adamCaxy)
Fix: Updated code so that null is not given in list formatting. \#17 (adamCaxy)
Fixed bugs:
Missed an array\_column in ListDiff. Updated to use ArrayColumn function. \#16 (jschroed91)
Fixed bugs:
Added update for php versions that do not have array\_column as a function. \#15 (jschroed91)
Fixed bugs:
Created ListDiff class to handle diffing of lists. \#14 (adamCaxy)
Implemented enhancements:
Note: There are many changes to the HtmlDiff class in this release. A new AbstractDiff class was created and HtmlDiff extends this new class, and many
Note: There are many changes to the HtmlDiff class in this release. A new AbstractDiff class was created and HtmlDiff extends this new class, and many of the common functions have been moved into the AbstractClass in preparation for some upcoming features and enhancements for the diffing of lists and tables.
The purpose of these changes is to isolate certain HTML elements in the old and new texts and diff them against the matching element (if one exists), in order to prevent issues with matches in old and new text overlapping certain HTML elements.
As an example, let's say you have the following inputs:
Old Text
Testing text with <sup>superscript</sup>
New Text
Testing text with superscript
Output Before These Changes
Testing some text with <ins class="mod">superscript</ins>
Output After These Changes
Testing some text with <sup class="diffmod"><del class="diffmod">superscript</del></sup><ins class="diffmod">superscript</ins>
As you can see in this example, before these changes were made it was seeing the match on the word superscript in both, but was not accounting for the fact that the word was in superscript in the old text and is no longer in superscript in the new text.
The solution that was implemented in this release was to encapsulate certain HTML elements and diff them separately from the rest of the text, in order to prevent issues with matches overlapping HTML elements.
Currently, the elements to isolate and diff are: ol, ul, dl, sup, sub, and table.
These are set on a protected property on the HtmlDiff class: $isolatedDiffTags. In this release, this property is not exposed to be configured, but there are additional updates coming soon that will allow configuration of the elements to be handled in this manner.
Implemented enhancements:
Merged pull requests:
Properties and functions in HtmlDiff.php have been updated to protected visibility instead of private to allow for extending the class.
Properties and functions in HtmlDiff.php have been updated to protected visibility instead of private to allow for extending the class.
Check for empty oldText or newText before processing del or ins in processReplaceOperation
Check for empty oldText or newText before processing del or ins in processReplaceOperation
Fixed bugs:
Add option to insert a space between del and ins tags - this is only done in replacements, and will insert a space between the and tags in the replace
Add option to insert a space between del and ins tags - this is only done in replacements, and will insert a space between the <del> and <ins> tags in the replace operation.
Implemented enhancements:
Break out HTML content to individual HTML, CSS, JS files \#6 (mgersten-caxy)
Implemented enhancements:
Fixed bugs:
Added static properties for the default config variables \#4 (jschroed91)
Implemented enhancements:
Merged pull requests:
* This Change Log was automatically generated by github_changelog_generator
One column per quarter.