[web-php] master: Update the end of release cycle based on approved https://wiki.php.net/rfc/release_cycle_update
| From: | Alexandru Pătrănescu via Derick Rethans | Date: | Tue, 30 Apr 2024 10:50:42 +0000 |
| Subject: | [web-php] master: Update the end of release cycle based on approved https://wiki.php.net/rfc/release_cycle_update | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-31629@lists.php.net to get a copy of this message | ||
Author: Alexandru Pătrănescu (drealecs)
Committer: Derick Rethans (derickr)
Date: 2024-04-30T05:50:35-05:00
Commit: https://github.com/php/web-php/commit/e367a4aca5635a8d1e1275b1bb78f5d050769cd6
Raw diff: https://github.com/php/web-php/commit/e367a4aca5635a8d1e1275b1bb78f5d050769cd6.diff
Update the end of release cycle based on approved https://wiki.php.net/rfc/release_cycle_update
Changed paths:
M include/branches.inc
Diff:
diff --git a/include/branches.inc b/include/branches.inc
index f141e3ef0e..a7a8d0a094 100644
--- a/include/branches.inc
+++ b/include/branches.inc
@@ -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);
}
function get_branch_security_eol_date($branch): ?DateTime
@@ -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