Generated with the help of an LLM.

Problem/Motivation

DbUpdateController::selection() builds the list of pending database updates inline. The list covers hook_update_N() and post-update functions. It also covers updates blocked by unmet dependencies. Other callers, such as the updatedb:status command found in Drush, must copy that logic.

Proposed resolution

Add DatabaseUpdate::getPendingUpdates(). It returns an array keyed by extension name. Each entry has the extension type, an optional warning, and a list of updates. Each update has a type, name, function, description, an "allowed" flag and its missing dependencies. DbUpdateController::selection() uses the new method. The rendered page does not change.

Remaining tasks

Decide how and if we do a deprecation for the constructor args addition.

User interface changes

None.

API changes

One new public method. DatabaseUpdate::__construct() takes a new optional $postUpdateRegistry argument.

Data model changes

None.

Issue fork drupal-3638091

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

moshe weitzman created an issue.