Overly strict typehinting breaks install if a machine_name_<number> function is defined

Created on 3 May 2025, 12 days ago

Overview

I'm enabling XB on an install profile that has a function install_profile_404() task defined. experience_builder_module_implements_alter() typehints $hook as a string, but it ends up being cast as an integer:

PHP Fatal error:  Uncaught TypeError: experience_builder_module_implements_alter(): Argument #2 ($hook) must be of type string, int given, called in /var/www/html/web/core/lib/Drupal/Core/Hook/HookCollectorPass.php on line 94 and defined in /var/www/html/web/modules/contrib/experience_builder/experience_builder.module:110

Proposed resolution

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension... does not have any typehints declared for hook_module_implements_alter(), so let's remove it.

User interface changes

None.

🐛 Bug report
Status

Active

Version

0.0

Component

Code

Created by

ðŸ‡ĻðŸ‡ĶCanada deviantintegral

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

Comments & Activities

Production build 0.71.5 2024