Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Snippet from \Drupal\Core\Extension\ModuleHandler::getImplementationInfo():
// Since $this->hookImplements() may needlessly try to load the include
// file again, function_exists() is used directly here.
if (function_exists($module . '_' . $hook)) {
$this->implementations[$hook][$module] = $include_file ? $hook_info[$hook]['group'] : FALSE;
}
I can't find any hookImplements() method in core so this comment seems to be incorrect.
Proposed resolution
Find the correct method to reference and change this comment.
Remaining tasks
- Patch to be written
- Patch needs to be reviewed
User interface changes
n/a
API changes
n/a
Comment | File | Size | Author |
---|---|---|---|
#2 | getImplementationInfo-2163625-2.patch | 938 bytes | StephaneQ |
Comments
Comment #1
jhodgdonLooks like the implementsHook() method is the one that should have been referenced.
Comment #2
StephaneQHere is a patch
Comment #4
jhodgdonThanks! Some kind of random test failure there. As this is a one-line comment-only patch and did not have a PHP syntax error, I do not think I'll waste test bot time by hitting retest.
Comment #5
jhodgdonThanks again! Committed to 8.x.