Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the end of release cycle based on approved RFC #985

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions include/branches.inc
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,15 @@ function get_branch_bug_eol_date($branch): ?DateTime

$date = get_branch_release_date($branch);

return $date ? $date->add(new DateInterval('P2Y')) : null;
$date = $date?->add(new DateInterval('P2Y'));

// Versions before 8.2 do not extend the release cycle to the end of the year
if (version_compare($branch, '8.2', '<')) {
return $date;
}

// Extend the release cycle to the end of the year
return $date?->setDate($date->format('Y'), 12, 31);
drealecs marked this conversation as resolved.
Show resolved Hide resolved
}

function get_branch_security_eol_date($branch): ?DateTime
Expand All @@ -324,7 +332,16 @@ function get_branch_security_eol_date($branch): ?DateTime
}

$date = get_branch_release_date($branch);
return $date ? $date->add(new DateInterval('P3Y')) : null;

// Versions before 8.1 have 3-year support since the initial release
if (version_compare($branch, '8.1', '<')) {
return $date?->add(new DateInterval('P3Y'));
}

$date = $date?->add(new DateInterval('P4Y'));

// Extend the release cycle to the end of the year
return $date?->setDate($date->format('Y'), 12, 31);
}

function get_branch_release_date($branch): ?DateTime
Expand Down