// @see \Drupal\update\EventSubscriber\ConfigSubscriber::onConfigSave()
$this->keyValueExpirable->
setWithExpire(self::ADVISORIES_JSON_EXPIRABLE_KEY,
$json_payload,
$interval_seconds);
} else { $this->logger->
error('The security advisory JSON feed from Drupal.org could not be decoded.'
);
return NULL;
} } foreach ($json_payload as $advisory_data) { try { $sa = SecurityAdvisory::
createFromArray($advisory_data);
} catch (\UnexpectedValueException
$unexpected_value_exception) { // Ignore items in the feed that are in an invalid format. Although
// this is highly unlikely we should still display the items that are
// in the correct format.
Error::
logException($this->logger,
$unexpected_value_exception, 'Invalid security advisory format: @advisory',
['@advisory' => Json::
encode($advisory_data)]);
continue;
} if ($this->
isApplicable($sa)) { $advisories[] =
$sa;
}