caxy / php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML. Includes support for comparing complex lists and tables
http://php-htmldiff.caxy.com
GNU General Public License v2.0
202 stars 51 forks source link

PHP8 Compatibility #93

Closed SavageTiger closed 3 years ago

SavageTiger commented 3 years ago

Description

PHP 8 came out a couple of weeks ago, but this library is not compatible with it yet.

In order to make it compatible I have done a couple of things.

See commit descriptions for more information.

Reasoning behind the minimum PHP version

Our vendors (PHPUnit) in this case, have left the old versions long behind, there is no maintained version that still supports PHP5, and I would argue that if you really want to use PHP5 (or have to) you can lock a release version of this library, since it has been a stable library for a couple of years.

Tested on PHP8

I have run all tests on PHP8, and checked with code coverage how much code was covered, about 80%, so I feel confidant that we are PHP8 compatible now.

Sidenote

I did notice we have some classes like ListDiff and ListDiffItem that are not referenced in the codebase @jschroed91, can we clean those up? 😅

SavageTiger commented 3 years ago

See also: https://www.drupal.org/project/diff/issues/3186705