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

CommentFileSizeAuthor
#2 getImplementationInfo-2163625-2.patch938 bytesStephaneQ
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Looks like the implementsHook() method is the one that should have been referenced.

StephaneQ’s picture

Status: Active » Needs review
FileSize
938 bytes

Here is a patch

Status: Needs review » Needs work

The last submitted patch, 2: getImplementationInfo-2163625-2.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community

Thanks! 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.

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again! Committed to 8.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.