Problem/Motivation
Hook requirements uses phase right now to manage whether it is runtime, install, or update.
Let's move the update portion.
Create a new hook_update_requirements.
It is currently invoked in update.inc
function update_check_requirements() {
// Because this is one of the earliest points in the update process,
// detect and fix missing schema versions for modules here to ensure
// it runs on all update code paths.
_update_fix_missing_schema();
// Check requirements of all loaded modules.
$requirements = \Drupal::moduleHandler()->invokeAll('requirements', ['update']);
\Drupal::moduleHandler()->alter('requirements', $requirements);
$requirements += update_system_schema_requirements();
return $requirements;
}
Steps to reproduce
N/A
Proposed resolution
Create hook_update_requirements
Create hook_update_requirements_alter
Invoke hook_update_requirements after hook_requirements
Merge results
Run hook_requirements_alter
Run hook_update_requirements_alter
Remaining tasks
User interface changes
N/A