Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299794

Create hook_update_requirements

$
0
0

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

Introduced terminology

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 299794

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>