By nicxvan on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.2.x
Introduced in version:
11.2.0
Issue links:
Description:
The functionality of hook_module_implements_alter is replaced with two new attributes and an order parameter on the #[Hook] attribute. Ordering must be done using new functionality.
Update existing hook_module_implements_alter code
This is not a typical deprecation and requires care for your module to support versions of Drupal older than 11.2
Follow these steps to update your module in a backwards compatible way;
- Achieve the same functionality as your
hook_module_implements_alter. Dynamic ordering is currently not supported. - Add the
#[LegacyModuleImplementsAlter]to your implementation ofhook_module_implements_alter. Once the minimum supported version of Drupal for the module is 11.2 or larger you may delete the entire function and attribute.
These change records provide examples for updating hook_module_implements_alter implementations.
Impacts:
Module developers
Site templates, recipes and distribution developers