Commit:    464ffa5497f19d25da15941752d3ec6ee3e63d29
Author:    Adam Harvey <[email protected]>         Mon, 27 Oct 2014 15:16:39 -0700
Parents:   f1a3ca46cc851552bcad7ce28f6df9e3993a1452
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=464ffa5497f19d25da15941752d3ec6ee3e63d29

Log:
Add a more generic ability to override support dates.

Changed paths:
  M  include/branches.inc


Diff:
diff --git a/include/branches.inc b/include/branches.inc
index dd5e33d..73fd3ea 100644
--- a/include/branches.inc
+++ b/include/branches.inc
@@ -2,6 +2,24 @@
 include_once $_SERVER['DOCUMENT_ROOT'] . '/include/releases.inc';
 include_once $_SERVER['DOCUMENT_ROOT'] . '/include/version.inc';
 
+/* Branch overrides. For situations where we've changed the exact dates for a
+ * branch's active support and security fix EOLs, these can be reflected here.
+ *
+ * Supported keys are:
+ *    - stable:   the end of active support (usually two years after release).
+ *    - security: the end of security support (usually release + 3 years).
+ */
+$BRANCHES = array(
+       '5.3' => array(
+               'stable'   => '2013-07-11',
+               'security' => '2014-08-14',
+       ),
+       '5.4' => array(
+               'stable'   => '2014-09-14',
+               'security' => '2015-09-14',
+       ),
+);
+
 function format_interval($from, $to) {
        try {
                $from_obj = $from instanceof DateTime ? $from : new 
DateTime($from);
@@ -196,9 +214,8 @@ function get_initial_release($branch) {
 }
 
 function get_branch_bug_eol_date($branch) {
-       // Hardcode 5.3.
-       if (strncmp($branch, '5.3', 3) == 0) {
-               return new DateTime('2013-07-11');
+       if (isset($GLOBALS['BRANCHES'][$branch]['stable'])) {
+               return new DateTime($GLOBALS['BRANCHES'][$branch]['stable']);
        }
 
        $date = get_branch_release_date($branch);
@@ -207,9 +224,8 @@ function get_branch_bug_eol_date($branch) {
 }
 
 function get_branch_security_eol_date($branch) {
-       // Hardcode 5.3.
-       if (strncmp($branch, '5.3', 3) == 0) {
-               return new DateTime('2014-08-14');
+       if (isset($GLOBALS['BRANCHES'][$branch]['security'])) {
+               return new DateTime($GLOBALS['BRANCHES'][$branch]['security']);
        }
 
        $date = get_branch_release_date($branch);


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to