Issue #2384009 by arpitr: Remove deprecated function _update_create_fetch_task and its usage
parent
88307ff863
commit
c7245b000b
|
@ -314,7 +314,6 @@ class UpdateCoreTest extends UpdateTestBase {
|
||||||
|
|
||||||
// Clear storage and try again.
|
// Clear storage and try again.
|
||||||
update_storage_clear();
|
update_storage_clear();
|
||||||
drupal_static_reset('_update_create_fetch_task');
|
|
||||||
update_create_fetch_task($projecta);
|
update_create_fetch_task($projecta);
|
||||||
$this->assertEqual($queue->numberOfItems(), 2, 'Queue contains two items');
|
$this->assertEqual($queue->numberOfItems(), 2, 'Queue contains two items');
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,26 +29,6 @@ function _update_refresh() {
|
||||||
\Drupal::service('update.manager')->refreshUpdateData();
|
\Drupal::service('update.manager')->refreshUpdateData();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a task to the queue for fetching release history data for a project.
|
|
||||||
*
|
|
||||||
* We only create a new fetch task if there's no task already in the queue for
|
|
||||||
* this particular project (based on 'update_fetch_task' key-value collection).
|
|
||||||
*
|
|
||||||
* @param $project
|
|
||||||
* Associative array of information about a project as created by
|
|
||||||
* update_get_projects(), including keys such as 'name' (short name), and the
|
|
||||||
* 'info' array with data from a .info.yml file for the project.
|
|
||||||
*
|
|
||||||
* @see \Drupal\update\UpdateFetcher::createFetchTask()
|
|
||||||
*
|
|
||||||
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
|
|
||||||
* Use \Drupal::service('update.processor')->createFetchTask().
|
|
||||||
*/
|
|
||||||
function _update_create_fetch_task($project) {
|
|
||||||
\Drupal::service('update.processor')->createFetchTask($project);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs any notifications that should be done once cron fetches new data.
|
* Performs any notifications that should be done once cron fetches new data.
|
||||||
*
|
*
|
||||||
|
|
|
@ -368,17 +368,21 @@ function update_get_available($refresh = FALSE) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new fetch task after loading the necessary include file.
|
* Adds a task to the queue for fetching release history data for a project.
|
||||||
|
*
|
||||||
|
* We only create a new fetch task if there's no task already in the queue for
|
||||||
|
* this particular project (based on 'update_fetch_task' key-value collection).
|
||||||
*
|
*
|
||||||
* @param $project
|
* @param $project
|
||||||
* Associative array of information about a project. See update_get_projects()
|
* Associative array of information about a project as created by
|
||||||
* for the keys used.
|
* update_get_projects(), including keys such as 'name' (short name), and the
|
||||||
|
* 'info' array with data from a .info.yml file for the project.
|
||||||
|
*
|
||||||
|
* @see \Drupal\update\UpdateFetcher::createFetchTask()
|
||||||
*
|
*
|
||||||
* @see _update_create_fetch_task()
|
|
||||||
*/
|
*/
|
||||||
function update_create_fetch_task($project) {
|
function update_create_fetch_task($project) {
|
||||||
module_load_include('inc', 'update', 'update.fetch');
|
\Drupal::service('update.processor')->createFetchTask($project);
|
||||||
_update_create_fetch_task($project);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue