From 4fba546100797d1646a2e274f5c5411524749919 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 24 Apr 2025 13:06:59 +0100 Subject: [PATCH 1/4] Introduce QA/Release Candidate Builds on main website --- downloads.php | 9 ++- include/release-qa.php | 170 +++++++++++++++++++++++++++++++++++++++++ release-candidates.php | 83 ++++++++++++++++++++ 3 files changed, 258 insertions(+), 4 deletions(-) create mode 100644 include/release-qa.php create mode 100644 release-candidates.php diff --git a/downloads.php b/downloads.php index 20c416ef6e..5468da840f 100644 --- a/downloads.php +++ b/downloads.php @@ -18,11 +18,12 @@ -

Documentation download

-

PHP logos

+

Documentation Download

+

PHP Logos

-

Development sources (git)

-

Old archives

+

Release Candidates

+

Development Sources (git)

+

Old Archives

'; site_header("Downloads", diff --git a/include/release-qa.php b/include/release-qa.php new file mode 100644 index 0000000000..71003097e8 --- /dev/null +++ b/include/release-qa.php @@ -0,0 +1,170 @@ + [ + 'active' => true, + 'release' => [ + 'type' => 'RC', + 'number' => 0, + 'sha256_gz' => '', + 'sha256_bz2' => '', + 'sha256_xz' => '', + 'date' => '07 Nov 2023', + 'baseurl' => 'https://downloads.php.net/', + ], + ], + + '8.2.27' => [ + 'active' => true, + 'release' => [ + 'type' => 'RC', + 'number' => 0, + 'sha256_bz2' => '', + 'sha256_gz' => '', + 'sha256_xz' => '', + 'date' => '05 Dec 2024', + 'baseurl' => 'https://downloads.php.net/', + ], + ], + + '8.3.20' => [ + 'active' => true, + 'release' => [ + 'type' => 'RC', + 'number' => 0, + 'sha256_bz2' => '', + 'sha256_gz' => '', + 'sha256_xz' => '', + 'date' => '27 Mar 2025', + 'baseurl' => 'https://downloads.php.net/', + ], + ], + + '8.4.7' => [ + 'active' => true, + 'release' => [ + 'type' => 'RC', + 'number' => 1, + 'sha256_bz2' => 'acddb1da1b128f984df01347c907a64939f316d7d9bd138b49106f4179b7776f', + 'sha256_gz' => 'b12d97767aeda4624ea1904c1d93303efe4ffe1ba91970a3c5774ad556918e93', + 'sha256_xz' => '6cb37632eb65ee311cb4427ad070b6ab27fdaf13e8f0103701b2b78907326c93', + 'date' => '24 Apr 2025', + 'baseurl' => 'https://downloads.php.net/~saki', + ], + ], +]; + +/*** End Configuration *******************************************************************/ + +// This is a list of the possible checksum values that can be supplied with a QA release. Any +// new algorithm is read from the $QA_RELEASES array under the 'release' index for each version +// in the form of "$algorithm_$filetype". +// +// For example, if SHA512 were to be supported, the following indices would have to be added: +// +// 'sha512_bz2' => 'xxx', +// 'sha512_gz' => 'xxx', +// 'sha512_xz' => 'xxx', +$QA_CHECKSUM_TYPES = ['sha256']; + +// $QA_RELEASES eventually contains just about everything, also for external use +// release : These are encouraged for use (e.g., linked at qa.php.net) +// reported : These are allowed to report @ the php.qa.reports mailing list + +(function(&$QA_RELEASES) use ($QA_CHECKSUM_TYPES) { + foreach ($QA_RELEASES as $pversion => $info) { + + if (isset($info['active']) && $info['active']) { + + // Allow -dev versions of all active types + // Example: 5.3.6-dev + $QA_RELEASES['reported'][] = "{$pversion}-dev"; + $QA_RELEASES[$pversion]['dev_version'] = "{$pversion}-dev"; + + // Allow -dev version of upcoming qa releases (rc/alpha/beta) + // @todo confirm this php version format for all dev versions + if ((int)$info['release']['number'] > 0) { + $QA_RELEASES['reported'][] = "{$pversion}{$info['release']['type']}{$info['release']['number']}"; + if (!empty($info['release']['baseurl'])) { + + // php.net filename format for qa releases + // example: php-5.3.0RC2 + $fn_base = 'php-' . $pversion . $info['release']['type'] . $info['release']['number']; + + $QA_RELEASES[$pversion]['release']['version'] = $pversion . $info['release']['type'] . $info['release']['number']; + foreach ([ 'bz2', 'gz', 'xz' ] as $file_type) { + foreach ($QA_CHECKSUM_TYPES as $algo) { + if (isset($info['release'][$algo . '_' . $file_type])) { + $QA_RELEASES[$pversion]['release']['files'][$file_type][$algo] = $info['release'][$algo . '_' . $file_type]; + } + } + if (!empty($QA_RELEASES[$pversion]['release']['files'][$file_type])) { + $QA_RELEASES[$pversion]['release']['files'][$file_type]['path']= $info['release']['baseurl'] . $fn_base . '.tar.' . $file_type; + } + } + + if (empty($QA_RELEASES[$pversion]['release']['files'])) { + $QA_RELEASES[$pversion]['release']['enabled'] = false; + } + } + } else { + $QA_RELEASES[$pversion]['release']['enabled'] = false; + } + + } + } + + // Sorted information for later use + // @todo need these? + // $QA_RELEASES['releases'] : All current versions with active qa releases + foreach ($QA_RELEASES as $pversion => $info) { + if (isset($info['active']) && $info['active'] && !empty($info['release']['number'])) { + $QA_RELEASES['releases'][$pversion] = $info['release']; + } + } + +})($QA_RELEASES); diff --git a/release-candidates.php b/release-candidates.php new file mode 100644 index 0000000000..6584b4510d --- /dev/null +++ b/release-candidates.php @@ -0,0 +1,83 @@ + 'downloads', +]); + +?> +

Release Candidate Builds

+

+ This page contains links to the Release Candidate builds that the release + managers create before each actual release. These builds are meant for the + community to test whether no inadvertent changes have been made, and + whether no regressions have been introduced. +

+ +

Available QA Releases:

+ +

+
+Windows users: +See here for the Windows QA builds. +

+\n"; + + if (!empty($QA_RELEASES['releases'])) { + + $plural = count($QA_RELEASES['releases']) > 1 ? 's' : ''; + + // QA Releases + echo "\n"; + echo "Providing QA for the following test release{$plural}:

\n"; + echo "
\n"; + echo "\n"; + + foreach ($QA_RELEASES['releases'] as $pversion => $info) { + + echo "\n"; + echo "\n"; + echo "\n"; + + foreach ($info['files'] as $file_type => $file_info) { + echo "\n"; + echo "\n"; + + foreach ($QA_CHECKSUM_TYPES as $algo) { + echo '\n"; + } + + echo "\n"; + } + } + + echo "
\n"; + echo "

{$info['version']}

\n"; + echo "
php-{$info['version']}.tar.{$file_type}'; + echo '' . strtoupper($algo) . ': '; + + if (isset($file_info[$algo]) && strlen($file_info[$algo])) { + echo $file_info[$algo]; + } else { + echo '(No checksum value available) '; + } + + echo "
\n"; + } else { + echo "There are no QA releases available at the moment to test."; + } + + echo "\n"; +} From c0800c1d228b080d3fad3506de0da963e2cbaa6e Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 24 Apr 2025 13:12:44 +0100 Subject: [PATCH 2/4] Fix downloads URL --- include/release-qa.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/release-qa.php b/include/release-qa.php index 71003097e8..4fe4c18efa 100644 --- a/include/release-qa.php +++ b/include/release-qa.php @@ -93,7 +93,7 @@ 'sha256_gz' => 'b12d97767aeda4624ea1904c1d93303efe4ffe1ba91970a3c5774ad556918e93', 'sha256_xz' => '6cb37632eb65ee311cb4427ad070b6ab27fdaf13e8f0103701b2b78907326c93', 'date' => '24 Apr 2025', - 'baseurl' => 'https://downloads.php.net/~saki', + 'baseurl' => 'https://downloads.php.net/~saki/', ], ], ]; From bf5b8beb1e795144e8c52205329925d7b1942840 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 24 Apr 2025 13:40:40 +0100 Subject: [PATCH 3/4] Make the layout copy what we have for normal releases --- get-involved.php | 2 +- release-candidates.php | 118 +++++++++++++++++++---------------------- 2 files changed, 56 insertions(+), 64 deletions(-) diff --git a/get-involved.php b/get-involved.php index 59f96f4de2..5d1482216d 100644 --- a/get-involved.php +++ b/get-involved.php @@ -26,7 +26,7 @@

Four Best Ways to Contribute

    -
  1. Running test suites in RC +
  2. Running test suites in RC and release distributions of PHP
  3. Help finding and diagnosing failed tests, see the phpt documentation
  4. diff --git a/release-candidates.php b/release-candidates.php index 6584b4510d..6194c5a4cf 100644 --- a/release-candidates.php +++ b/release-candidates.php @@ -5,79 +5,71 @@ $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); +$SIDEBAR_DATA = ' +
    + Test Releases +
    + The downloads on this page are not meant to be run in production. They are + for testing only. +
    +
    + If you find a problem when running your library or application with these + builds, please file a report on GitHub Issues. +
    +
    +'; + site_header("Release Candidates", [ - 'current' => 'downloads', + 'current' => 'downloads', ]); ?>

    Release Candidate Builds

    - This page contains links to the Release Candidate builds that the release - managers create before each actual release. These builds are meant for the - community to test whether no inadvertent changes have been made, and - whether no regressions have been introduced. +This page contains links to the Release Candidate builds that the release +managers create before each actual release. These builds are meant for the +community to test whether no inadvertent changes have been made, and +whether no regressions have been introduced.

    Available QA Releases:

    - + + 1 ? 's' : ''; ?> + + $info) : ?> +

    + PHP +

    +
    + +
      + $file_info) : ?> +
    • + + + + + + + + No checksum value available)  + + +
    • + +
    + + + There are no QA releases available at the moment to test. + +

    -
    -Windows users: -See here for the Windows QA builds. +
    + Windows users: + See here for the Windows QA builds.

    -\n"; - - if (!empty($QA_RELEASES['releases'])) { - - $plural = count($QA_RELEASES['releases']) > 1 ? 's' : ''; - - // QA Releases - echo "\n"; - echo "Providing QA for the following test release{$plural}:

    \n"; - echo "
    \n"; - echo "\n"; - foreach ($QA_RELEASES['releases'] as $pversion => $info) { - - echo "\n"; - echo "\n"; - echo "\n"; - - foreach ($info['files'] as $file_type => $file_info) { - echo "\n"; - echo "\n"; - - foreach ($QA_CHECKSUM_TYPES as $algo) { - echo '\n"; - } - - echo "\n"; - } - } - - echo "
    \n"; - echo "

    {$info['version']}

    \n"; - echo "
    php-{$info['version']}.tar.{$file_type}'; - echo '' . strtoupper($algo) . ': '; - - if (isset($file_info[$algo]) && strlen($file_info[$algo])) { - echo $file_info[$algo]; - } else { - echo '(No checksum value available) '; - } - - echo "
    \n"; - } else { - echo "There are no QA releases available at the moment to test."; - } + $SIDEBAR_DATA]); - echo "\n"; -} From f5c2005b75f798751dc8af7ed7c0611f75f5d284 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 24 Apr 2025 13:47:57 +0100 Subject: [PATCH 4/4] Fix download links --- release-candidates.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-candidates.php b/release-candidates.php index 6194c5a4cf..d3a6c46432 100644 --- a/release-candidates.php +++ b/release-candidates.php @@ -46,7 +46,7 @@
      $file_info) : ?>
    • - +