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-beta1
Issue links:
Description:
The following hooks still support OOP implementations
hook_form_alterhook_form_BASE_FORM_ID_alterhook_form_FORM_ID_alterhook_preprocesshook_preprocess_HOOK
The #[FormAlter] attribute has been removed
The #[FormAlter] attribute was added in 11.2.0-alpha1 and removed for 11.2.0-beta1 and beyond.
hook_form_altercan still be OOP, use#[Hook('form_alter')]instead.hook_form_BASE_FORM_ID_altercan still be OOP, use#[Hook('form_BASE_FORM_ID_alter')]instead.hook_form_FORM_ID_altercan still be OOP, use#[Hook('form_FORM_ID_alter')]instead.
The #[Preprocess] attribute has been removed
The #[Preprocess] attribute was added in 11.2.0-alpha1 and removed for 11.2.0-beta1 and beyond.
hook_preprocesscan still be OOP, use#[Hook('preprocess')]instead.hook_preprocess_HOOKcan still be OOP, use#[Hook('preprocess_HOOK')]instead.
Changes to the #[Hook] attribute
The PREFIX and SUFFIX constants have been removed from the #[Hook] attribute, there is no replacement. The $hook parameter is required.
Impacts:
Module developers
Site templates, recipes and distribution developers