function SecurityAdvisoriesFetcher::getProjectExistingVersion
Same name in other branches
- 10 core/modules/system/src/SecurityAdvisories/SecurityAdvisoriesFetcher.php \Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher::getProjectExistingVersion()
- 11.x core/modules/system/src/SecurityAdvisories/SecurityAdvisoriesFetcher.php \Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher::getProjectExistingVersion()
Gets the existing project version.
Parameters
\Drupal\system\SecurityAdvisories\SecurityAdvisory $sa: The security advisory.
Return value
string|null The project version, or NULL if the project does not exist on the site.
1 call to SecurityAdvisoriesFetcher::getProjectExistingVersion()
- SecurityAdvisoriesFetcher::matchesExistingVersion in core/
modules/ system/ src/ SecurityAdvisories/ SecurityAdvisoriesFetcher.php - Determines if an advisory matches the existing version of a project.
File
-
core/
modules/ system/ src/ SecurityAdvisories/ SecurityAdvisoriesFetcher.php, line 268
Class
- SecurityAdvisoriesFetcher
- Defines a service to get security advisories.
Namespace
Drupal\system\SecurityAdvisoriesCode
protected function getProjectExistingVersion(SecurityAdvisory $sa) : ?string {
if ($sa->isCoreAdvisory()) {
return \Drupal::VERSION;
}
$extension_info = $this->getMatchingExtensionInfo($sa);
return $extension_info['version'] ?? NULL;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.