Required library has code deprecation

Created on 8 January 2025, 3 months ago

Problem/Motivation

Using the module on PHP 8.4 generates a deprecation notice:

Deprecated: Caxy\HtmlDiff\HtmlDiff::create(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiff.php on line 34

Proposed resolution

The library has already resolved the issue in its codebase, but a release has not yet been made. This can be fixed by patching the library, but whether this is something that should be done within the diff module I don't know.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom MrDaleSmith

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @MrDaleSmith
  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

    It seems to me that mkalkbrenner/php-htmldiff-advanced is pretty much abandoned. I don't think the diff module should rely on it. Since it's GPL-2.0, the 2 classes could be brought into this module and the dependency changed to a recent version of caxy/php-htmldiff.

    I think this should be elevated to Major since PHP 8.4 is supported by Drupal 11.

  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

    I guess on new installs it gets the new release so not Major. I think it could be a Minor to just ditch the extra dependency and bring in its classes into diff module.

    It will remove the need for the hook_requirements, phpstan overrides, etc...

  • Pipeline finished with Failed
    20 days ago
    Total: 255s
    #453208
  • Pipeline finished with Failed
    20 days ago
    Total: 281s
    #453212
  • Pipeline finished with Failed
    20 days ago
    Total: 285s
    #453220
  • Pipeline finished with Failed
    20 days ago
    Total: 318s
    #453231
  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA
  • Pipeline finished with Success
    20 days ago
    Total: 412s
    #453235
Production build 0.71.5 2024