Issue #3602223: Convert remaining hooks to OOP for Drupal 12 and drop legacy .inc files

Makes publication_date Drupal 12 ready, superseding the bot MR !32 (closed).

The bot MR was generated against a pre-OOP base and reintroduced static \Drupal:: calls in a hook class (undoing #3567175). This does the conversion cleanly instead:

  • Converts the remaining procedural hooks (hook_tokens, hook_token_info_alter, hook_views_data_alter) to OOP #[Hook] classes in src/Hook/, with the token and date.formatter services constructor-injected (no static \Drupal:: calls).
  • Removes the legacy publication_date.tokens.inc / publication_date.views.inc; core no longer ships these in the OOP era. Thin #[LegacyHook] wrappers stay in .module for ^10.3 || ^11 BC (OOP hooks require 11.1+).
  • core_version_requirement: ^10.3 || ^11 || ^12.
  • Adds #[Group] + #[RunTestsInSeparateProcesses] to the Functional tests (required by D11.3, throws in D12).

Verified locally: phpcs, phpstan (no static-call warnings), cspell, and the full Functional suite (13 tests, 155 assertions) all pass.

MR !32 (closed) should be closed in favour of this one.

Merge request reports

Loading