Update Composer, update everything

This commit is contained in:
Oliver Davies 2018-11-23 12:29:20 +00:00
parent ea3e94409f
commit dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions

View file

@ -23,6 +23,8 @@ use Drupal\Core\Site\Settings;
*
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
* Use \Drupal\update\UpdateManagerInterface::NOT_SECURE instead.
*
* @see https://www.drupal.org/node/2831620
*/
const UPDATE_NOT_SECURE = 1;
@ -31,6 +33,8 @@ const UPDATE_NOT_SECURE = 1;
*
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
* Use \Drupal\update\UpdateManagerInterface::REVOKED instead.
*
* @see https://www.drupal.org/node/2831620
*/
const UPDATE_REVOKED = 2;
@ -39,6 +43,8 @@ const UPDATE_REVOKED = 2;
*
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
* Use \Drupal\update\UpdateManagerInterface::NOT_SUPPORTED instead.
*
* @see https://www.drupal.org/node/2831620
*/
const UPDATE_NOT_SUPPORTED = 3;
@ -47,6 +53,8 @@ const UPDATE_NOT_SUPPORTED = 3;
*
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
* Use \Drupal\update\UpdateManagerInterface::NOT_CURRENT instead.
*
* @see https://www.drupal.org/node/2831620
*/
const UPDATE_NOT_CURRENT = 4;
@ -55,6 +63,8 @@ const UPDATE_NOT_CURRENT = 4;
*
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
* Use \Drupal\update\UpdateManagerInterface::CURRENT instead.
*
* @see https://www.drupal.org/node/2831620
*/
const UPDATE_CURRENT = 5;
@ -63,6 +73,8 @@ const UPDATE_CURRENT = 5;
*
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
* Use \Drupal\update\UpdateFetcherInterface::NOT_CHECKED instead.
*
* @see https://www.drupal.org/node/2831620
*/
const UPDATE_NOT_CHECKED = -1;
@ -71,6 +83,8 @@ const UPDATE_NOT_CHECKED = -1;
*
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
* Use \Drupal\update\UpdateFetcherInterface::UNKNOWN instead.
*
* @see https://www.drupal.org/node/2831620
*/
const UPDATE_UNKNOWN = -2;
@ -79,6 +93,8 @@ const UPDATE_UNKNOWN = -2;
*
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
* Use \Drupal\update\UpdateFetcherInterface::NOT_FETCHED instead.
*
* @see https://www.drupal.org/node/2831620
*/
const UPDATE_NOT_FETCHED = -3;
@ -87,6 +103,8 @@ const UPDATE_NOT_FETCHED = -3;
*
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
* Use \Drupal\update\UpdateFetcherInterface::FETCH_PENDING instead.
*
* @see https://www.drupal.org/node/2831620
*/
const UPDATE_FETCH_PENDING = -4;
@ -167,17 +185,18 @@ function update_page_top() {
foreach (['core', 'contrib'] as $report_type) {
$type = 'update_' . $report_type;
// hook_requirements() supports render arrays therefore we need to render
// them before using drupal_set_message().
// them before using
// \Drupal\Core\Messenger\MessengerInterface::addStatus().
if (isset($status[$type]['description']) && is_array($status[$type]['description'])) {
$status[$type]['description'] = \Drupal::service('renderer')->renderPlain($status[$type]['description']);
}
if (!empty($verbose)) {
if (isset($status[$type]['severity'])) {
if ($status[$type]['severity'] == REQUIREMENT_ERROR) {
drupal_set_message($status[$type]['description'], 'error');
\Drupal::messenger()->addError($status[$type]['description']);
}
elseif ($status[$type]['severity'] == REQUIREMENT_WARNING) {
drupal_set_message($status[$type]['description'], 'warning');
\Drupal::messenger()->addWarning($status[$type]['description']);
}
}
}
@ -187,7 +206,7 @@ function update_page_top() {
if (isset($status[$type])
&& isset($status[$type]['reason'])
&& $status[$type]['reason'] === UPDATE_NOT_SECURE) {
drupal_set_message($status[$type]['description'], 'error');
\Drupal::messenger()->addError($status[$type]['description']);
}
}
}
@ -349,7 +368,7 @@ function update_get_available($refresh = FALSE) {
foreach ($projects as $key => $project) {
// If there's no data at all, we clearly need to fetch some.
if (empty($available[$key])) {
//update_create_fetch_task($project);
// update_create_fetch_task($project);
\Drupal::service('update.processor')->createFetchTask($project);
$needs_refresh = TRUE;
continue;
@ -389,6 +408,45 @@ function update_get_available($refresh = FALSE) {
return $available;
}
/**
* Identifies equivalent security releases with a hardcoded list.
*
* Generally, only the latest minor version of Drupal 8 is supported. However,
* when security fixes are backported to an old branch, and the site owner
* updates to the release containing the backported fix, they should not
* see "Security update required!" again if the only other security releases
* are releases for the same advisories.
*
* @return string[]
* A list of security release numbers that are equivalent to this release
* (i.e. covered by the same advisory), for backported security fixes only.
*
* @internal
*
* @deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Use the
* 'Insecure' release type tag in update XML provided by Drupal.org to
* determine if releases are insecure.
*/
function _update_equivalent_security_releases() {
trigger_error("_update_equivalent_security_releases() was a temporary fix and will be removed before 9.0.0. Use the 'Insecure' release type tag in update XML provided by Drupal.org to determine if releases are insecure.", E_USER_DEPRECATED);
switch (\Drupal::VERSION) {
case '8.3.8':
return ['8.4.5', '8.5.0-rc1'];
case '8.3.9':
return ['8.4.6', '8.5.1'];
case '8.4.5':
return ['8.5.0-rc1'];
case '8.4.6':
return ['8.5.1'];
case '8.4.7':
return ['8.5.2'];
case '8.4.8':
return ['8.5.3'];
}
return [];
}
/**
* Adds a task to the queue for fetching release history data for a project.
*
@ -437,15 +495,15 @@ function update_fetch_data_finished($success, $results) {
if ($success) {
if (!empty($results)) {
if (!empty($results['updated'])) {
drupal_set_message(\Drupal::translation()->formatPlural($results['updated'], 'Checked available update data for one project.', 'Checked available update data for @count projects.'));
\Drupal::messenger()->addStatus(\Drupal::translation()->formatPlural($results['updated'], 'Checked available update data for one project.', 'Checked available update data for @count projects.'));
}
if (!empty($results['failures'])) {
drupal_set_message(\Drupal::translation()->formatPlural($results['failures'], 'Failed to get available update data for one project.', 'Failed to get available update data for @count projects.'), 'error');
\Drupal::messenger()->addError(\Drupal::translation()->formatPlural($results['failures'], 'Failed to get available update data for one project.', 'Failed to get available update data for @count projects.'));
}
}
}
else {
drupal_set_message(t('An error occurred trying to get available update data.'), 'error');
\Drupal::messenger()->addError(t('An error occurred trying to get available update data.'), 'error');
}
}
@ -607,7 +665,6 @@ function template_preprocess_update_last_check(&$variables) {
* version of Drupal core.
*
* @see \Drupal\Core\Extension\ExtensionDiscovery
* @see _system_rebuild_module_data()
*/
function update_verify_update_archive($project, $archive_file, $directory) {
$errors = [];