Skip to content

Conversation

nlighteneddesign
Copy link
Contributor

Description

There are two procedural only hooks we missed.

Also preprocess is now supported for 11.2.

To Test

Needs manual testing.

Drupal.org issue

https://www.drupal.org/project/drupal/issues/3524872

@nlighteneddesign nlighteneddesign marked this pull request as draft July 4, 2025 13:57
'update_last_removed',
];
if (in_array($hook, $procOnly) || str_starts_with($hook, 'preprocess') || str_starts_with($hook, 'process')) {
if (in_array($hook, $procOnly)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|| preg_match('/^(post_update_|update_\d+$)/', $hook) is missing in line 258. see checkForProceduralOnlyHooks in https://git.drupalcode.org/project/drupal/-/blob/11.2.x/core/lib/Drupal/Core/Hook/HookCollectorPass.php?ref_type=heads#L585

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not missing, this script does not run on .install or post_update files so those hooks will not be affected.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These hooks aren't always in .install or post_update files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you share an example?

@nlighteneddesign nlighteneddesign marked this pull request as ready for review July 11, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants