Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
base system
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jul 2025 at 00:09 UTC
Updated:
31 Jul 2025 at 18:09 UTC
Jump to comment: Most recent
Comments
Comment #4
mstrelan commentedOK that test fail suggests this might not be a novice issue. IIRC there is another issue for ignoring hooks from modules that are not installed. This might be a duplicate of that.
Comment #6
sijumpk commentedComment #7
sijumpk commentedFrom the code context, it seems like the usage of that assert is to confirm system_test module is not installed. If there is an issue with checking hooks, then we can do the same assertion using module_handler's moduleExists function. Plz review the code.
Comment #8
smustgrave commentedSummary doesn't appear to match the MR. Should check the issue the assert was added to see what the goal was.
Comment #9
mstrelan commentedThe assertion was added in #2160091-61: drupal_rebuild() rebuilds container twice, since drupal_flush_all_caches() also rebuilds it (specifically comment #61). Have not reviewed closely, just identifying where it happened.
Comment #10
mstrelan commentedI guess since Hooks classes are now autoloaded unconditionally it doesn't make sense to check if a method exists. I've updated the test to check if the hook implementation exists instead.
Comment #11
smustgrave commentedThanks for looking that up! Changes LGTM
Comment #12
sijumpk commentedComment #15
catchCommitted/pushed to 11.x, thanks!