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.
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
Issue priority | Normal just removing unnecessary code |
---|---|
Disruption | None - this part of the module handler does not change much :) |
Comment | File | Size | Author |
---|---|---|---|
d8.remove-unnecessary-function-exists.patch | 1.02 KB | alexpott | |
Comments
Comment #1
alexpottComment #2
alexpottComment #3
alexpottComment #4
dawehnerSo 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.
Comment #5
catchCommitted/pushed to 8.0.x, thanks!