function ProjectSecurityData::getSecurityCoverageUntilVersion
Same name in other branches
- 9 core/modules/update/src/ProjectSecurityData.php \Drupal\update\ProjectSecurityData::getSecurityCoverageUntilVersion()
- 10 core/modules/update/src/ProjectSecurityData.php \Drupal\update\ProjectSecurityData::getSecurityCoverageUntilVersion()
- 11.x core/modules/update/src/ProjectSecurityData.php \Drupal\update\ProjectSecurityData::getSecurityCoverageUntilVersion()
Gets the release the current minor will receive security coverage until.
For the sake of example, assume that the currently installed version of Drupal is 8.7.11 and that static::CORE_MINORS_WITH_SECURITY_COVERAGE is 2. When Drupal 8.9.0 is released, the supported minor versions will be 8.8 and 8.9. At that point, Drupal 8.7 will no longer have security coverage. Therefore, this function would return "8.9.0".
@todo In https://www.drupal.org/node/2998285 determine how we will know what the final minor release of a particular major version will be. This method should not return a version beyond that minor.
Return value
string|null The version the existing version will receive security coverage until or NULL if this cannot be determined.
1 call to ProjectSecurityData::getSecurityCoverageUntilVersion()
- ProjectSecurityData::getCoverageInfo in core/
modules/ update/ src/ ProjectSecurityData.php - Gets the security coverage information for a project.
File
-
core/
modules/ update/ src/ ProjectSecurityData.php, line 167
Class
- ProjectSecurityData
- Calculates a project's security coverage information.
Namespace
Drupal\updateCode
private function getSecurityCoverageUntilVersion() {
$existing_release_version = ModuleVersion::createFromVersionString($this->existingVersion);
if (!empty($existing_release_version->getVersionExtra())) {
// Only full releases receive security coverage.
return NULL;
}
return $existing_release_version->getMajorVersion() . '.' . ($this->getSemanticMinorVersion($this->existingVersion) + static::CORE_MINORS_WITH_SECURITY_COVERAGE) . '.0';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.