Commit f9196ffa authored by Thomas Löffler's avatar Thomas Löffler

Use getLatestLTS() method

parent 15cf6050
Pipeline #7812 passed with stages
in 2 minutes and 55 seconds
......@@ -79,13 +79,11 @@ class LTSVersionService
public function getAllLTSVersions(): array
{
$ltsVersions = [];
$latestLts = explode('.', $this->coreData['latest_lts']);
$latestOldLts = explode('.', $this->coreData['latest_old_lts']);
foreach ($this->coreData as $releaseVersion => $releaseData) {
if (in_array($releaseVersion, $this->ltsVersionsWithMinorVersions) || $releaseVersion >= self::FIRST_LTS_VERSION_WITH_MAIN_VERSION_NUMBER) {
$latestVersionParts = explode('.', $releaseData['latest']);
// check if is LTS
if ((int)$latestVersionParts[0] > (int)$latestLts[0]) {
if ((int)$latestVersionParts[0] > $this->getLatestLTS()) {
continue;
}
$minimumVersion = $latestVersionParts[0] . '.' . $latestVersionParts[1] . '.0';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment