Link to documentation on the new way of changing the order of hooks from LegacyModuleImplementsAlter

Created on 28 August 2025, 15 days ago

API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Hook%21At...

We call the class "Legacy"; there is clearly a new way. We should link to it.

That new way is described in the change record "hook_module_implements_alter requires the #[LegacyModuleImplementsAlter] attribute", https://www.drupal.org/node/3496788

That also links to three other change records:

"Hook implementations can be ordered with an order parameter", https://www.drupal.org/node/3493962
"Reorder hook implementations in other modules with the #[ReOrderHook] attribute", https://www.drupal.org/node/3497308
"Hook implementations can now be removed with a #[RemoveHook] attribute.", https://www.drupal.org/node/3496786

We could link to the one and/or the three. If there is actual API documentation for all of this, the change records should also have links to it and we could link to that directly (as a See also or Related topic?) rather than linking to any change record at all.

Given that comments are apparently, unfortunately, no longer allowed on API documentation pages, it is more important that we include these sorts of pointers in the code that generates the API documentation.

📌 Task
Status

Active

Version

11.0 🔥

Component

documentation

Created by

🇺🇸United States mlncn Minneapolis, MN, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024