Problem/Motivation

This explains everything. The list should not be cleaned up. Even between Major updates. See example system_removed_post_updates. Even removed hooks from D9 are still in the list.

Steps to reproduce

Proposed resolution

Go through all minor releases, copy list, add the list back to 2.6.x and 2.5.x.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

tobiasb created an issue. See original summary.

tobiasb’s picture

Status: Active » Closed (won't fix)

Ok. No. I will not migrate removed update hooks.

Would be possible, but it is anyway impossible to skip required version. e.g. 1.3.x to 2.5.x without 2.0.x.

I will just leave the updates there, then it is fine.

In case I change my mine, example with openculturas_custom:

/**
 * Implements hook_removed_post_updates().
 */
function openculturas_custom_removed_post_updates(): array {
  $needs_migration = [
      'openculturas_custom_post_update_set_allowed_values_function_for_field_status' => '2.2.0',
      'openculturas_custom_post_update_set_allowed_values_function_for_field_premiere' => '2.2.0',
      'openculturas_custom_post_update_grant_administer_openculturas_custom_configuration' => '2.2.0',
  ];
  $migrated = \Drupal::state()->get(__FUNCTION__);
  if ($migrated === NULL) {
    $needs_migration = [];
  }
  return $needs_migration + [];
}
/**
 * Implements hook_update_N().
 */
function openculturas_custom_update_9302(): void {
  $removed_updates = [
    'openculturas_custom_post_update_set_allowed_values_function_for_field_status',
    'openculturas_custom_post_update_set_allowed_values_function_for_field_premiere',
    'openculturas_custom_post_update_grant_administer_openculturas_custom_configuration',
  ];
  \Drupal::service('update.post_update_registry')->registerInvokedUpdates($removed_updates);
  \Drupal::state()->set('openculturas_custom_removed_post_updates', TRUE);
}

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.