Skip to content

Commit 295c610

Browse files
committed
Remove the eol.php special case for 5.3.29.
Instead, let's have an optional "eol" flag for releases in the $RELEASES array, and use that to drive eol.php.
1 parent cd03151 commit 295c610

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

eol.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</tr>
3939
</thead>
4040
<tbody>
41-
<?php foreach (get_eol_branches(array('5.3.29')) as $major => $branches):
41+
<?php foreach (get_eol_branches() as $major => $branches):
4242

4343
foreach ($branches as $branch => $detail) {
4444
try {

include/branches.inc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ function version_number_to_branch($version) {
1313
* must be in $RELEASES _and_ must be the full version number, not the branch:
1414
* ie provide array('5.3.29'), not array('5.3'). */
1515
function get_eol_branches($always_include = null) {
16+
$always_include = $always_include ? $always_include : array();
1617
$branches = array();
1718

1819
// Gather the last release on each branch into a convenient array.
@@ -31,12 +32,19 @@ function get_eol_branches($always_include = null) {
3132
}
3233

3334
/* Exclude releases from active branches, where active is defined as "in
34-
* the $RELEASES array". */
35+
* the $RELEASES array and not explicitly marked as EOL there". */
3536
foreach ($GLOBALS['RELEASES'] as $major => $releases) {
3637
foreach ($releases as $version => $release) {
3738
if ($branch = version_number_to_branch($version)) {
38-
if (isset($branches[$major][$branch])) {
39-
unset($branches[$major][$branch]);
39+
if (empty($release['eol'])) {
40+
/* This branch isn't EOL: remove it from our array. */
41+
if (isset($branches[$major][$branch])) {
42+
unset($branches[$major][$branch]);
43+
}
44+
} else {
45+
/* Add the release information to the EOL branches array, since it
46+
* should be newer than the information we got from $OLDRELEASES. */
47+
$always_include[] = $version;
4048
}
4149
}
4250
}

include/version.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
* "date" => "this files release date",
1111
* "note" => "this file was updated 29feb due to broken phar files..",
1212
* ),
13-
* "announcement" => "bool, release announcement exists in releases/?"
13+
* "announcement" => "bool, release announcement exists in releases/?",
14+
* "eol" => "bool, true to mark as EOL (affects bug tracker and eol.php)"
1415
* ),
1516
* ),
1617
* );
@@ -127,6 +128,7 @@ $RELEASES = array(
127128
),
128129
$PHP_5_3_VERSION => array(
129130
"announcement" => true,
131+
"eol" => true,
130132
"source" => array(
131133
array(
132134
"filename" => "php-$PHP_5_3_VERSION.tar.bz2",

0 commit comments

Comments
 (0)