protected function SecurityAdvisoriesFetcher::getProjectExistingVersion in Drupal 10
Same name and namespace in other branches
- 9 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;
}