Problem/Motivation
Future versions of Drupal will only support object-oriented hook implementations. That update can be done now.
Furthermore, other modules which may need to remove this module's hooks with the #[RemoveHook] attribute (e.g., for performance reasons) aren't able to since that attribute requires a class/method to be specified.
Proposed resolution/Remaining tasks
Convert the following hooks to be object oriented:
hook_entity_presave
hook_entity_presave
-
Convert hook_requirements('runtime') to runtime_requirements hook.: Change record.
hook_requirements('install'): Unfortunately, this cannot be converted because it's not possible to call other module-code in the D11+ version of this hook. Change record.
User interface changes
None.
API changes
Requirements will not be checked prior to installation, only at runtime.
Data model changes
None.
Comments
Comment #3
gabesulliceComment #4
gabesulliceComment #5
gabesulliceComment #6
gabesulliceIn case others are on version 1.22, I've back-ported this MR to that release in this patch because 1.22 does not implement
hook_requirements: https://www.drupal.org/files/issues/2025-09-24/3548151-support-object-oriented-hooks.patchComment #7
plachLooks good!