3642268: Drupal 11 compatibility + PHPCS and PHPstan fixes

Closes #3642268

Drupal 10 and 11 compatibility

Makes the module work on Drupal 10 and 11, and fixes the coding standards (phpcs) and static analysis (phpstan) issues. No changes to how the module works.

Changes

  • core_version_requirement is now ^10 || ^11 (drops Drupal 9).
  • Replaces the deprecated rebuildThemeData() with the extension.list.theme service.
  • Uses dependency injection in the listener controller and the admin form instead of \Drupal:: calls and $_POST.
  • Moves the RMH_* constants to UpdateHelperInterface. The old global constants still work but are marked deprecated.
  • Adds the helper's public methods to UpdateHelperInterface.
  • Coding standards cleanup (comments, spacing, README line length).

Testing

  • phpcs (Drupal, DrupalPractice): clean.
  • phpstan (drupal.org CI config): clean on Drupal 10.6 and 11.4.
  • On fresh Drupal 10 and 11 sites: install the module, run cron, save the settings form with "Send now", check the status report and the /api/rmc/key listener. All behave the same as before.

Note

Sites that extend or replace the evercurrent.update_helper service will need to update their code, because the interface and constructor changed.

Merge request reports

Loading
Loading