Looking at the module handler I think we can remove the function_exists in invokeAll since this is checked when discover hook implementations - see ModuleHandler::buildImplementationInfo() and is checked at runtime in ModuleHandler::verifyImplementations() - where it is removed from the implementation list if it does not exist. Therefore it is impossible at this point for the function to not exist at this point.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue priority Normal just removing unnecessary code
Disruption None - this part of the module handler does not change much :)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott’s picture

Issue summary: View changes
alexpott’s picture

Issue summary: View changes
alexpott’s picture

Issue summary: View changes
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

So yeah this might bring a bit of performance but it also makes things easier to read.
Having the exists call in one place is the actual win here.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.0.x, thanks!

  • catch committed 0e989e2 on 8.0.x
    Issue #2403117 by alexpott: Remove unnecessary function_exists in...

Status: Fixed » Closed (fixed)

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