Issue #3629639: Drupal 12 compatibility

Drupal 12 readiness for the 2.0.x line, for [#3629639].

  • core_version_requirement: ^10.3 || ^11.2 || ^12. Floor raised from ^9.5 || ^10 || ^11: DeprecationHelper needs 10.1+, the enum/OOP hook ordering below needs 10.3/11.2 (older 11.x lines are EOL).
  • getSubscribedEvents() return types (: array) for Symfony 8.
  • RequirementSeverity enum when the class exists, REQUIREMENT_ERROR otherwise.
  • views_field_default_views_data() is removed in 12: call FieldViewsDataProvider::defaultFieldImplementation() via DeprecationHelper::backwardsCompatibleCall() (CR 3489502).
  • hook_tokens() moved to Drupal\address\Hook\AddressTokenHooks with #[Hook('tokens', order: Order::Last)] so the "run last" ordering survives (CR 3496788); the procedural function stays as a #[LegacyHook] bridge for cores without OOP ordering.

Not run on a real Drupal 12 install yet; needs review.

Backlink: https://github.com/YCloudYUSA/yusaopeny/pull/388 (Drupal 12 readiness of the YMCA Website Services distribution).

Edited by Andrii Podanenko

Merge request reports

Loading
Loading