Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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();
}
Comments
Comment #1
arpitr CreditAttribution: arpitr commentedComment #2
mikemiles86Comment #3
mikemiles86Comment #4
mikemiles86Patch 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.
Comment #5
mikemiles86Comment #7
mikemiles86Patch has trailing whitespaces. Re-rolling
Comment #8
mikemiles86Re-rolled patch, to remove trailing whitespaces.
Comment #9
mikemiles86Comment #10
mikemiles86Comment #11
lokapujyaPatch applies and tests pass.
Comment #12
webchickRemoving 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 #13
lokapujyaNeeds review of Change Notice.
Comment #14
cilefen CreditAttribution: cilefen commentedI reviewed the change record and it looks good to me.
Comment #15
cilefen CreditAttribution: cilefen commentedI fixed an error in the CR and added examples.
Comment #16
webchickSorry, no longer applies now thanks to #2384035: Remove deprecated function _update_refresh and its usage.
Comment #17
lokapujyaRerolled.
Comment #18
cilefen CreditAttribution: cilefen commentedThanks for the reroll. There must be a newline after the short function description. And shouldn't UpdateFetcher in the @see be UpdateProcessor?
Comment #19
suntog CreditAttribution: suntog commentedMade suggested changes by cilfen comment #18.
Comment #20
cilefen CreditAttribution: cilefen commentedThank you @suntog. This is RTBC if green. Then we need to publish the change records.
Comment #21
catchCommitted/pushed to 8.0.x, thanks!