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
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
Comment #3
moshe weitzman commentedComment #4
smustgrave commentedEarliest deprecations now are 12.1.0
Comment #5
moshe weitzman commentedDatabaseUpdate is introduced in 11.5 which his not yet released. I dont think such conservatism is warranted. I could remove the deprecation message if that will make this go down smoother.
Comment #6
smustgrave commentedbut 11.5 is in beta and my understanding it needs to be extreme case to add new deprecations