Deprecate DiffEngine and replace with sebastian/diff

Created on 25 July 2022, over 2 years ago
Updated 25 September 2023, about 1 year ago

Problem/Motivation

DiffEngine is a fork of a library from 17 years ago. It is obviously stable to some extent, but it's code is extremely non-Drupal and it only ever gets the bare minimum attention to port. It seems likely that eventually we're going to hit bigger issues with PHP version compatibility.

Every so often it fails a new code quality check. The most recent example of it showing up in an issue is #3274474: Fix 'Access to an undefined property' PHPStan L0 errors . It also is not PHP 8.2 compatible and triggers PHPStan L0 errors.

Proposed resolution

Deprecate DiffEngine and replace it with https://github.com/sebastianbergmann/diff

Remaining tasks


Evaluated options (considered in D9), then left out when the D10 proposal was formulated

1. Fix the 8.2 compatibility (possibly by adding phpcs-ignore/phpstan-ignore to the entire file so we don't have to rewrite the entire file to do so), then deprecate it in 10.1.x for 11.x for one of the alternatives
2. Fix the 8.2 compatibility and deprecate it in 9.5.x for 11.x
3. Don't fix the 8.2 compatiblity, and deprecate it in 9.5.x for removal in 10.0.x, but with a patch ready against diff module to switch over.
4. Don't fix the 8.2 compatibility and deprecate it in 9.5.x for 11.x (basically diff module would have to switch over to get PHP 8.2 compatibility but without a hard deadline).

User interface changes

API changes

Data model changes

Release notes snippet

Dependency evaluation

This package is already in use indirectly on Drupal test environments as it is a dependency of PHPUnit, used to report diff of actuals vs expectations. It has over 450 million downloads (Feb 2023) total, over 300k downloads daily.

Maintainership: Maintained by Sebastian Bergmann and the PHPUnit community.

Security policy: https://github.com/sebastianbergmann/diff/blob/main/SECURITY.md

Release cycle: No schedule, it appears to be kept in synch with PHP evolution as needed by PHPUnit.

Other dependencies: None.

📌 Task
Status

Fixed

Version

10.1

Component
Base 

Last updated about 3 hours ago

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024