function hook_removed_post_updates

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/module.api.php \hook_removed_post_updates()
  2. 10 core/lib/Drupal/Core/Extension/module.api.php \hook_removed_post_updates()
  3. 11.x core/lib/Drupal/Core/Extension/module.api.php \hook_removed_post_updates()

Return an array of removed hook_post_update_NAME() function names.

This should be used to indicate post-update functions that have existed in some previous version of the module, but are no longer available.

This implementation has to be placed in a MODULE.post_update.php file.

Return value

string[] An array where the keys are removed post-update function names, and the values are the first stable version in which the update was removed.

See also

hook_post_update_NAME()

Related topics

1 function implements hook_removed_post_updates()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

update_test_postupdate_removed_post_updates in core/modules/system/tests/modules/update_test_postupdate/update_test_postupdate.post_update.php
Implements hook_removed_post_updates().

File

core/lib/Drupal/Core/Extension/module.api.php, line 794

Code

function hook_removed_post_updates() {
    return [
        'mymodule_post_update_foo' => '8.x-2.0',
        'mymodule_post_update_bar' => '8.x-3.0',
        'mymodule_post_update_baz' => '8.x-3.0',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.