Active
Project:
Drupal core
Version:
main
Component:
forms system
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
1 May 2025 at 13:13 UTC
Updated:
16 Jan 2026 at 09:17 UTC
Jump to comment: Most recent
There are almost no hooks left that need to be in .module files.
There are a few things that need investigation:
core/includes/form.inc:955: if (($function = $batch['redirect_callback']) && function_exists($function)) {
core/modules/views/src/Plugin/views/HandlerBase.php:572: if (isset($this->definition['access callback']) && function_exists($this->definition['access callback'])) {
core/modules/views_ui/src/ViewUI.php:341: $cancel_submit = function_exists($form_id . '_cancel') ? $form_id . '_cancel' : [$this, 'standardCancel'];
Comments
Comment #2
quietone commentedComment #3
quietone commentedComment #4
nicxvan commentedI think we just need to ensure there are alternatives to these.
Comment #5
catchHaven't reviewed it yet, but from the title #1002080: [Policy, no patch] Normalize on usage of is_callable() instead of function_exists() might be enough.
Comment #6
nicxvan commentedOh nice!
Comment #7
mstrelan commentedOpened #3536204: Deprecate magic cancel submit handlers in Views UI
Comment #8
quietone commentedMaking this a plan and made #3520416: [meta] Handle calls to functions that still require .module file autoloading. a child of this.
Comment #9
nicxvan commentedComment #10
steinmb commented