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();
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arpitr’s picture

arpitr’s picture

Assigned: arpitr » Unassigned
Status: Needs work » Needs review
arpitr’s picture

Assigned: Unassigned » arpitr
Status: Needs review » Needs work
arpitr’s picture

arpitr’s picture

Assigned: arpitr » Unassigned
Status: Needs work » Needs review
arpitr’s picture

Title: Remove usage of deprecated function _update_refresh » Remove deprecated function _update_refresh and its usage
Issue summary: View changes
arpitr’s picture

Covers function definition and its references.

mikemiles86’s picture

Assigned: Unassigned » mikemiles86
Issue tags: +SprintWeekend2015

Status: Needs review » Needs work
mikemiles86’s picture

Old patch did not apply cleanly. I have re-rolled the patch.

mikemiles86’s picture

Assigned: mikemiles86 » Unassigned
Nafes’s picture

Representing Toronto #SprintWeekend. The patch works well.

Nafes’s picture

Status: Needs review » Reviewed & tested by the community
ronaldmulero’s picture

#11 applies cleanly.
admin/reports/updates displays correct release data for core and contrib modules.

webchick’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs change record

As 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.)

webchick’s picture

Also note that since the functions are very related, probably makes sense to cover them in the same change record rather than two separate ones.

lokapujya’s picture

Status: Needs work » Needs review
Issue tags: -Needs change record

Needs review of Change Notice.

cilefen’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed the change record and it looks good to me.

cilefen’s picture

I fixed an error in the CR and added examples.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Great, thanks!

Committed and pushed to 8.0.x.

  • webchick committed 03d50d2 on 8.0.x
    Issue #2384035 by arpitr, mikemiles86, lokapujya: Remove deprecated...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.