function update_create_fetch_task

Same name and namespace in other branches
  1. 11.x core/modules/update/update.module \update_create_fetch_task()
  2. 10 core/modules/update/update.module \update_create_fetch_task()
  3. 9 core/modules/update/update.module \update_create_fetch_task()
  4. 8.9.x core/modules/update/update.module \update_create_fetch_task()
  5. 7.x modules/update/update.module \update_create_fetch_task()

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

Parameters

array $project: Associative array of information about a project as created by \Drupal\update\UpdateManagerInterface::getProjects(), including keys such as 'name' (short name), and the 'info' array with data from a .info.yml file for the project.

Deprecated

in drupal:11.5.0 and is removed from drupal:13.0.0. Use \Drupal\update\UpdateProcessor::createFetchTask() instead.

See also

\Drupal\update\UpdateFetcher::createFetchTask()

https://www.drupal.org/node/3592959

File

core/modules/update/update.module, line 78

Code

function update_create_fetch_task($project) : void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. Use \\Drupal\\update\\UpdateProcessor::createFetchTask() instead. See https://www.drupal.org/node/3592959', E_USER_DEPRECATED);
  \Drupal::service('update.processor')->createFetchTask($project);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.