Remove deprecated function _update_fetch_data and its usage.

Usage
1. update.module

/**
 * Attempts to fetch update data after loading the necessary include file.
 *
 * @see _update_fetch_data()
 */
function update_fetch_data() {
  module_load_include('inc', 'update', 'update.fetch');
  _update_fetch_data();
}

Function
update.fetch.inc

/**
 * Attempts to drain the queue of tasks for release history data to fetch.
 *
 * @see \Drupal\update\UpdateFetcher::fetchData()
 *
 * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
 *   Use \Drupal::service('update.processor')->fetchData().
 */
function _update_fetch_data() {
  \Drupal::service('update.processor')->fetchData();
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arpitr’s picture

Assigned: arpitr » Unassigned
Status: Needs work » Needs review
FileSize
1.3 KB
mikemiles86’s picture

Assigned: Unassigned » mikemiles86
mikemiles86’s picture

Issue tags: +SprintWeekend2015
mikemiles86’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies cleanly to the current version of the 8.0.x branch.

- After applying patch, no instances of _update_fetch_data exist
- After applying patch, all tests in the update module are still successful.

I have also, re-queued the patch to be tested by testbot.

mikemiles86’s picture

Assigned: mikemiles86 » Unassigned
mikemiles86’s picture

Assigned: Unassigned » mikemiles86
Status: Reviewed & tested by the community » Needs work

Patch has trailing whitespaces. Re-rolling

mikemiles86’s picture

Re-rolled patch, to remove trailing whitespaces.

mikemiles86’s picture

Status: Needs work » Needs review
mikemiles86’s picture

Assigned: mikemiles86 » Unassigned
lokapujya’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies and tests pass.

webchick’s picture

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

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

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 » Needs work
lokapujya’s picture

Status: Needs work » Needs review
FileSize
1.33 KB

Rerolled.

cilefen’s picture

Status: Needs review » Needs work
+++ b/core/modules/update/update.module
@@ -395,12 +395,10 @@ function update_refresh() {
 /**
  * Attempts to fetch update data after loading the necessary include file.
- *
- * @see _update_fetch_data()
+ * @see \Drupal\update\UpdateFetcher::fetchData()

Thanks for the reroll. There must be a newline after the short function description. And shouldn't UpdateFetcher in the @see be UpdateProcessor?

suntog’s picture

Status: Needs work » Needs review
FileSize
1.33 KB
522 bytes

Made suggested changes by cilfen comment #18.

cilefen’s picture

Status: Needs review » Reviewed & tested by the community

Thank you @suntog. This is RTBC if green. Then we need to publish the change records.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.0.x, thanks!

  • catch committed 11e02a6 on 8.0.x
    Issue #2384049 by suntog, mikemiles86, lokapujya, arpitr: Remove...

Status: Fixed » Closed (fixed)

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