Issue #3604491: Drupal 12 compatibility
Makes user_bundle compatible with Drupal 12, building on the Project Update Bot's automated patch (MR !4 (closed)) but reworked to Drupal coding standards.
Changes
- Procedural hooks converted to OOP hooks. All
hook_*implementations move tosrc/Hook/UserBundleHooks.phpandsrc/Hook/UserBundleTokensHooks.phpas#[Hook]methods. The procedural functions remain as thin#[LegacyHook]delegators so the module keeps working on Drupal 10 (where OOP hook discovery does not exist and the attributes are inert). $view->save(TRUE)deprecation. Both calls inuser_bundle.installare wrapped inDeprecationHelper::backwardsCompatibleCall()(save(TRUE)is removed in Drupal 12).UserTypeForm::save()now returns the save statusint.EntityFormInterface::save()declares@return int; the override computed$statusbut never returned it.- Token hooks consolidated. The two token
#[LegacyHook]wrappers live inuser_bundle.module, anduser_bundle.tokens.incis removed (the real implementations are in the OOP hook class). core_version_requirementupdated to^10 || ^11 || ^12.
Note on Drupal 9
This drops Drupal 9 from core_version_requirement (now ^10). The OOP-hook shims and DeprecationHelper rely on 11.1+ / 10.1+ APIs, and Drupal 9 is end-of-life. Shout if D9 support must be retained.
Edited by Andrei Mateescu