Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Remove usage of deprecated function _update_refresh
Usages:
1. update.module
/**
* Refreshes the release data after loading the necessary include file.
*
* @see _update_refresh()
*/
function update_refresh() {
module_load_include('inc', 'update', 'update.fetch');
_update_refresh();
}
Function
update.fetch.inc
/**
* Clears out all the available update data and initiates re-fetching.
*
* @see \Drupal\update\UpdateManager::refreshUpdateData()
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::service('update.manager')->refreshUpdateData().
*/
function _update_refresh() {
\Drupal::service('update.manager')->refreshUpdateData();
}
Comments
Comment #1
arpitr CreditAttribution: arpitr commentedComment #2
arpitr CreditAttribution: arpitr commentedComment #3
arpitr CreditAttribution: arpitr commentedComment #4
arpitr CreditAttribution: arpitr commentedComment #5
arpitr CreditAttribution: arpitr commentedComment #6
arpitr CreditAttribution: arpitr commentedComment #7
arpitr CreditAttribution: arpitr commentedCovers function definition and its references.
Comment #8
mikemiles86Comment #11
mikemiles86Old patch did not apply cleanly. I have re-rolled the patch.
Comment #12
mikemiles86Comment #13
Nafes CreditAttribution: Nafes commentedRepresenting Toronto #SprintWeekend. The patch works well.
Comment #14
Nafes CreditAttribution: Nafes commentedComment #15
ronaldmulero CreditAttribution: ronaldmulero commented#11 applies cleanly.
admin/reports/updates displays correct release data for core and contrib modules.
Comment #16
webchickAs with #2384049: Remove deprecated function _update_fetch_data and its usage, removing deprecated functions is allowed during beta, so we're fine there, but searching for the old function name doesn't currently bring up a change record, so we need one of those. (At least one contrib module—Upgrade Status—calls this function.)
Comment #17
webchickAlso note that since the functions are very related, probably makes sense to cover them in the same change record rather than two separate ones.
Comment #18
lokapujyaNeeds review of Change Notice.
Comment #19
cilefen CreditAttribution: cilefen commentedI reviewed the change record and it looks good to me.
Comment #20
cilefen CreditAttribution: cilefen commentedI fixed an error in the CR and added examples.
Comment #21
webchickGreat, thanks!
Committed and pushed to 8.0.x.