caxy/php-htmldiff
A library for comparing two HTML files/snippets and highlighting the differences using simple HTML.
v0.1.17
23M downloads/mo
#1039 most downloaded on Packagist
caxy/php-htmldiff
What this package is like to depend on
Last release 1 years ago
16 May 2025
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
0 releases in the last 12 months
see the full history below
Release timeline
33 releases · Jul 2014 to May 2025Releases
latest 33-
v0.1.1716 May 2025Release notes
Open source →What's Changed
- Ignore unknown characters in iconv() by @jurgenhaas in #135
- Fix: Removed some more E_DEPRECATED error explicit nullable types by @richardbrinkman in #133
New Contributors
- @jurgenhaas made their first contribution in #135
Full Changelog: v0.1.16...v0.1.17
-
v0.1.1622 Jan 2025Release notes
Open source →What's Changed
- fix(php 8.4): Add explicit nullable type by @millnut in #130
- php 8.2: Deprecated function mb_convert_encoding() by @s-ayers in #125
- Correctly match newlines whitin htmltags. by @pharixces in #122
- Removed E_DEPRECATED error explicit nullable types by @richardbrinkman in #132
New Contributors
- @millnut made their first contribution in #130
- @s-ayers made their first contribution in #125
- @pharixces made their first contribution in #122
Full Changelog: v0.1.15...v0.1.16
-
v0.1.1505 Nov 2023Release notes
Open source →What's Changed
- Fix #120: deprecated HTML-ENTITIES encoding by @richardbrinkman in #121
- Add spaceMatching setting that matches all spaces by @berarma in #111
- Add a placeholder for the HTML5 picture element by @LukeLeber in #115
New Contributors
- @richardbrinkman made their first contribution in #121
- @berarma made their first contribution in #111
- @LukeLeber made their first contribution in #115
Full Changelog: v0.1.14...v0.1.15
-
v0.1.1419 Jan 2022Release notes
Open source →v0.1.14 (2022-01-19)
Changes:
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.
- Deprecated all setSpecialCaseTags() config calls. There is no replacement, but the current expectation is that nobody ever used these calls anyway.
- Fixed Issue 106 / 69 by removing special-case-tags from the codebase
- Reduced the CRAP score of insertTag() by allot
Release notes
Open source →Changes:
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.
- Deprecated all setSpecialCaseTags() config calls. There is no replacement, but the current expectation is that nobody ever used these calls anyway.
- Fixed Issue 106 / 69 by removing special-case-tags from the codebase
- Reduced the CRAP score of insertTag() by allot
-
v0.1.1327 Sep 2021Release notes
Open source →v0.1.13 (2021-09-27)
Changes:
- Add
.gitattributesfile to exclude demo and tests from the exported zip package to reduce package size when installed via composer (#86 - @danepowell )
Release notes
Open source →Changes:
- Add
.gitattributesfile to exclude demo and tests from the exported zip package to reduce package size when installed via composer (#86 - @danepowell). This meansdemo/andtests/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.
- Add
-
v0.1.1205 Apr 2021Release notes
Open source →Changes:
- Word parser is rebuild to improve performance by 98% (according to xhprof profiler) and reducing code complexity.
- Whitespace checking improvements in match finding algorithm to improve performance by allot, up to 50% in some of my testing
-
v0.1.1102 Feb 2021Release notes
Open source →Changes:
- Fixed a bug where self-closing tags got crippled in HtmlDiff
- Ported ListDiff from SimpleXML to DOMDocument
- Cleanup of old list diff algorithm
- Possibility to disable html-purifier using a config flag
- Removed dependency php-simple-html-dom-parser
-
v0.1.1005 Jan 2021Release notes
Open source →Important:
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.
Changes:
- Fixed the keywords that made this version incompatible with PHP8
- Upgraded PHPUnit dependencies with a PHP8 compatible version
-
v0.1.920 Feb 2019Release notes
Open source →Release notes
Open source → -
v0.1.815 Jan 2019Release notes
Open source →Release notes
Open source →Implemented enhancements:
- Possible diff algorithm improvement #46
- encoding #22
- Resolve PHP 7.3 compatibility issue to fix #79 #80 (irkallacz)
Closed issues:
-
v0.1.715 Mar 2018 -
v0.1.606 Jan 2018Release notes
Open source →Closed issues:
- Bug - bad comparison between words containing accented characters #66
Merged pull requests:
-
v0.1.512 Jun 2017Release notes
Open source →Fixed bugs:
- Crashes if string contains "Р" character (uppercase cyrillic Р letter) #58
Closed issues:
- Does not work on PHP 5.3.10 #61
Merged pull requests:
-
v0.1.402 May 2017Release notes
Open source →Merged pull requests:
- changes the [] arrays to array() as it does not work in php 5.3 #62 (myfriend12)
-
v0.1.321 Jul 2016Release notes
Open source →Implemented enhancements:
- HTMLDiff Performance inhancement #54 (SavageTiger)
Closed issues:
- Performance #38
Merged pull requests:
- Differ crashed when comparing regular space character in table column. #55 (SavageTiger)
-
v0.1.225 May 2016Release notes
Open source →Implemented enhancements:
- Diff styling for the demo #45
- Implement new List Diffing algorithm for matching #49 (jschroed91)
- Improve list diffing for lists with removed list items #48 (jschroed91)
- Cleanup CSS and add styles for highlighting differences (#45) #47 (jschroed91)
- Add method to clear content on AbstractDiff objects #44 (jschroed91)
- Add support for diffing img elements #36 (jschroed91)
Fixed bugs:
- Fixed HTMLPurifier not using the cache directory #53 (SavageTiger)
- Fix issues with type hints #52 (jschroed91)
- Fix issues with unencoded html chars breaking diffing #50 (jschroed91)
- Fix issues with spaces being removed in isolated diff tags #41 (jschroed91)
- Fixed issue with create call on TableDiff object #37 (dbergunder)
Closed issues:
- Config object not properly used when using the HtmlDiffBundle service #51
Merged pull requests:
- Remove unused ListDiff class and rename ListDiffNew to ListDiff #43 (jschroed91)
- Run php-cs-fixer on lib directory #42 (jschroed91)
-
v0.1.116 Mar 2016Release notes
Open source →Implemented enhancements:
- Update TableDiff HTMLPurifier Initialization. #35 (dbergunder)
Merged pull requests:
- Update the README and add additional documentation #34 (jschroed91)
-
0.1.010 Mar 2016Release notes
Open source →Implemented enhancements:
- Detecting link changes #28
- Allow the list match threshold percentage (ListDiff::$listMatchThreshold) to be configured #18
- Allow $isolatedDiffTags to be configured on HtmlDiff #13
- Create configuration class for HtmlDiff config options #32 (jschroed91)
Merged pull requests:
- Allow caching of the calculated diffs using a doctrine cache provider #33 (jschroed91)
-
0.1.0-beta.126 Feb 2016 pre-releaseRelease notes
Open source →Merged pull requests:
- New Feature: Table Diffing #31 (jschroed91)
- Detect link changes to resolve #28 #30 (jschroed91)
- Setup PHPUnit testsuite with basic functional test and a few test cases #26 (jschroed91)
-
0.0.1403 Feb 2016Release notes
Open source →Fixed bugs:
- Fix HtmlDiff matching logic skipping over single word matches #25 (jschroed91)
-
0.0.1312 Jan 2016Release notes
Open source →Fixed bugs:
- Misc. list diffing updates and fixes #24 (jschroed91)
- Updated list diff class to maintain the tags on lists. #23 (adamCaxy)
-
0.0.1211 Nov 2015 -
0.0.1106 Nov 2015Release notes
Open source → -
0.0.1021 Oct 2015 -
0.0.920 Oct 2015Release notes
Open source →Fixed bugs:
- Missed an array_column in ListDiff. Updated to use ArrayColumn function. #16 (jschroed91)
-
0.0.820 Oct 2015Release notes
Open source →Fixed bugs:
- Added update for php versions that do not have array_column as a function. #15 (jschroed91)
-
0.0.720 Oct 2015 -
0.0.611 Sep 2015Release notes
Open source →Implemented enhancements:
- ICC-4313 | ICC-4314 | Replace Special HTML Elements with placeholder tokens and update diffing logic #11 (usaqlein)
Merged pull requests:
- Feature - html tag isolation #12 (jschroed91)
-
0.0.503 Mar 2015Release notes
Open source → -
0.0.409 Jan 2015Release notes
Open source →Fixed bugs:
- Check for empty oldText or newText before processing del or ins in processReplaceOperation #9 (jschroed91)
-
0.0.308 Jan 2015Release notes
Open source →Implemented enhancements:
- Add option to insert a space between del and ins tags #8 (jschroed91)
- Updated demo to accept input and diff on the fly #5 (jschroed91)
-
0.0.212 Aug 2014Release notes
Open source →Implemented enhancements:
- Break out HTML content to individual HTML, CSS, JS files #6 (mgersten-caxy)
Fixed bugs:
- Fix error caused when passing empty array into setSpecialCaseTags #7 (jschroed91)
-
0.0.131 Jul 2014Release notes
Open source →Implemented enhancements:
- Added static properties for the default config variables #4 (jschroed91)
- Added option to group together diffed words in output #2 (jschroed91)
Merged pull requests:
- Feature nonpartial word diffing #3 (jschroed91)
* This Change Log was automatically generated by github_changelog_generator