Skip to content

Commit 3632f3d

Browse files
committed
Merge branch 'move-qa-to-web'
2 parents 9550e11 + f5c2005 commit 3632f3d

File tree

4 files changed

+251
-5
lines changed

4 files changed

+251
-5
lines changed

downloads.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
</div>
1919
</div>
2020
21-
<p class="panel"><a href="download-docs.php">Documentation download</a></p>
22-
<p class="panel"><a href="download-logos.php">PHP logos</a></p>
21+
<p class="panel"><a href="download-docs.php">Documentation Download</a></p>
22+
<p class="panel"><a href="download-logos.php">PHP Logos</a></p>
2323
24-
<p class="panel"><a href="/git.php">Development sources (git)</a></p>
25-
<p class="panel"><a href="/releases/">Old archives</a></p>
24+
<p class="panel"><a href="/release-candidates.php">Release Candidates</a></p>
25+
<p class="panel"><a href="/git.php">Development Sources (git)</a></p>
26+
<p class="panel"><a href="/releases/">Old Archives</a></p>
2627
';
2728

2829
site_header("Downloads",

get-involved.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<h3 class="content-title" id="ways-to-contribute">Four Best Ways to Contribute</h3>
2727

2828
<ol class="content-box listed">
29-
<li>Running test suites in <a href="https://qa.php.net/">RC</a>
29+
<li>Running test suites in <a href="/release-candidates.php">RC</a>
3030
and <a href="https://php.net/releases">release</a> distributions of PHP</li>
3131
<li>Help finding and diagnosing failed tests, see
3232
the <a href="https://qa.php.net/write-test.php">phpt documentation</a></li>

include/release-qa.php

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<?php
2+
3+
/*
4+
What this file does:
5+
- Generates the download links found at qa.php.net
6+
- Determines which test results are emailed to news.php.net/php.qa.reports
7+
- Defines $QA_RELEASES for internal and external (api.php) use, contains all qa related information for future PHP releases
8+
9+
Documentation:
10+
$QA_RELEASES documentation:
11+
Configuration:
12+
- Key is future PHP version number
13+
- Example: If 5.3.6 is the latest stable release, then use 5.3.7 because 5.3.7-dev is our qa version
14+
- Typically, this is the only part needing changed
15+
- active (bool):
16+
- It's active and being tested here
17+
- Meaning, the version will be reported to the qa.reports list, and be linked at qa.php.net
18+
- File extensions .tar.gz and .tar.bz2 are assumed to be available
19+
- release (array):
20+
- type: RC, alpha, and beta are examples (case should match filename case)
21+
- version: 0 if no such release exists, otherwise an integer of the rc/alpha/beta number
22+
- sha256_bz2: sha256 checksum of this downloadable .tar.bz2 file
23+
- sha256_gz: sha256 checksum of this downloadable .tar.gz file
24+
- sha256_xz: sha256 checksum of this downloadble .xz file
25+
- date: date of release e.g., 21 May 2011
26+
- baseurl: base url of where these downloads are located
27+
- Multiple checksums can be available, see the $QA_CHECKSUM_TYPES array below
28+
Other variables within $QA_RELEASES are later defined including:
29+
- reported: versions that make it to the qa.reports mailing list
30+
- release: all current qa releases, including paths to dl urls (w/ sha256 info)
31+
- dev_version: dev version
32+
- $QA_RELEASES is made available at qa.php.net/api.php
33+
34+
TODO:
35+
- Save all reports (on qa server) for all tests, categorize by PHP version (see buildtest-process.php)
36+
- Consider storing rc downloads at one location, independent of release master
37+
- Determine best way to handle rc baseurl, currently assumes .tar.gz/tar.bz2 will exist
38+
- Determine if $QA_RELEASES is compatible with all current, and most future configurations
39+
- Determine if $QA_RELEASES can be simplified
40+
- Determine if alpha/beta options are desired
41+
- Unify then create defaults for most settings
42+
- Add option to allow current releases (e.g., retrieve current release info via daily cron, cache, check, configure ~ALLOW_CURRENT_RELEASES)
43+
*/
44+
45+
46+
$QA_RELEASES = [
47+
48+
'8.1.27' => [
49+
'active' => true,
50+
'release' => [
51+
'type' => 'RC',
52+
'number' => 0,
53+
'sha256_gz' => '',
54+
'sha256_bz2' => '',
55+
'sha256_xz' => '',
56+
'date' => '07 Nov 2023',
57+
'baseurl' => 'https://downloads.php.net/',
58+
],
59+
],
60+
61+
'8.2.27' => [
62+
'active' => true,
63+
'release' => [
64+
'type' => 'RC',
65+
'number' => 0,
66+
'sha256_bz2' => '',
67+
'sha256_gz' => '',
68+
'sha256_xz' => '',
69+
'date' => '05 Dec 2024',
70+
'baseurl' => 'https://downloads.php.net/',
71+
],
72+
],
73+
74+
'8.3.20' => [
75+
'active' => true,
76+
'release' => [
77+
'type' => 'RC',
78+
'number' => 0,
79+
'sha256_bz2' => '',
80+
'sha256_gz' => '',
81+
'sha256_xz' => '',
82+
'date' => '27 Mar 2025',
83+
'baseurl' => 'https://downloads.php.net/',
84+
],
85+
],
86+
87+
'8.4.7' => [
88+
'active' => true,
89+
'release' => [
90+
'type' => 'RC',
91+
'number' => 1,
92+
'sha256_bz2' => 'acddb1da1b128f984df01347c907a64939f316d7d9bd138b49106f4179b7776f',
93+
'sha256_gz' => 'b12d97767aeda4624ea1904c1d93303efe4ffe1ba91970a3c5774ad556918e93',
94+
'sha256_xz' => '6cb37632eb65ee311cb4427ad070b6ab27fdaf13e8f0103701b2b78907326c93',
95+
'date' => '24 Apr 2025',
96+
'baseurl' => 'https://downloads.php.net/~saki/',
97+
],
98+
],
99+
];
100+
101+
/*** End Configuration *******************************************************************/
102+
103+
// This is a list of the possible checksum values that can be supplied with a QA release. Any
104+
// new algorithm is read from the $QA_RELEASES array under the 'release' index for each version
105+
// in the form of "$algorithm_$filetype".
106+
//
107+
// For example, if SHA512 were to be supported, the following indices would have to be added:
108+
//
109+
// 'sha512_bz2' => 'xxx',
110+
// 'sha512_gz' => 'xxx',
111+
// 'sha512_xz' => 'xxx',
112+
$QA_CHECKSUM_TYPES = ['sha256'];
113+
114+
// $QA_RELEASES eventually contains just about everything, also for external use
115+
// release : These are encouraged for use (e.g., linked at qa.php.net)
116+
// reported : These are allowed to report @ the php.qa.reports mailing list
117+
118+
(function(&$QA_RELEASES) use ($QA_CHECKSUM_TYPES) {
119+
foreach ($QA_RELEASES as $pversion => $info) {
120+
121+
if (isset($info['active']) && $info['active']) {
122+
123+
// Allow -dev versions of all active types
124+
// Example: 5.3.6-dev
125+
$QA_RELEASES['reported'][] = "{$pversion}-dev";
126+
$QA_RELEASES[$pversion]['dev_version'] = "{$pversion}-dev";
127+
128+
// Allow -dev version of upcoming qa releases (rc/alpha/beta)
129+
// @todo confirm this php version format for all dev versions
130+
if ((int)$info['release']['number'] > 0) {
131+
$QA_RELEASES['reported'][] = "{$pversion}{$info['release']['type']}{$info['release']['number']}";
132+
if (!empty($info['release']['baseurl'])) {
133+
134+
// php.net filename format for qa releases
135+
// example: php-5.3.0RC2
136+
$fn_base = 'php-' . $pversion . $info['release']['type'] . $info['release']['number'];
137+
138+
$QA_RELEASES[$pversion]['release']['version'] = $pversion . $info['release']['type'] . $info['release']['number'];
139+
foreach ([ 'bz2', 'gz', 'xz' ] as $file_type) {
140+
foreach ($QA_CHECKSUM_TYPES as $algo) {
141+
if (isset($info['release'][$algo . '_' . $file_type])) {
142+
$QA_RELEASES[$pversion]['release']['files'][$file_type][$algo] = $info['release'][$algo . '_' . $file_type];
143+
}
144+
}
145+
if (!empty($QA_RELEASES[$pversion]['release']['files'][$file_type])) {
146+
$QA_RELEASES[$pversion]['release']['files'][$file_type]['path']= $info['release']['baseurl'] . $fn_base . '.tar.' . $file_type;
147+
}
148+
}
149+
150+
if (empty($QA_RELEASES[$pversion]['release']['files'])) {
151+
$QA_RELEASES[$pversion]['release']['enabled'] = false;
152+
}
153+
}
154+
} else {
155+
$QA_RELEASES[$pversion]['release']['enabled'] = false;
156+
}
157+
158+
}
159+
}
160+
161+
// Sorted information for later use
162+
// @todo need these?
163+
// $QA_RELEASES['releases'] : All current versions with active qa releases
164+
foreach ($QA_RELEASES as $pversion => $info) {
165+
if (isset($info['active']) && $info['active'] && !empty($info['release']['number'])) {
166+
$QA_RELEASES['releases'][$pversion] = $info['release'];
167+
}
168+
}
169+
170+
})($QA_RELEASES);

release-candidates.php

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
$_SERVER['BASE_PAGE'] = 'qa.php';
3+
include_once __DIR__ . '/include/prepend.inc';
4+
include_once __DIR__ . '/include/release-qa.php';
5+
6+
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
7+
8+
$SIDEBAR_DATA = '
9+
<div class="panel">
10+
Test Releases
11+
<div class="body">
12+
The downloads on this page are not meant to be run in production. They are
13+
for testing only.
14+
</div>
15+
<div class="body">
16+
If you find a problem when running your library or application with these
17+
builds, please file a report on <a
18+
href="https://github.com/php/php-src/issues/">GitHub Issues</a>.
19+
</div>
20+
</div>
21+
';
22+
23+
site_header("Release Candidates", [
24+
'current' => 'downloads',
25+
]);
26+
27+
?>
28+
<h1>Release Candidate Builds</h1>
29+
<p>
30+
This page contains links to the Release Candidate builds that the release
31+
managers create before each actual release. These builds are meant for the
32+
community to test whether no inadvertent changes have been made, and
33+
whether no regressions have been introduced.
34+
</p>
35+
36+
<h3>Available QA Releases:</h3>
37+
<?php if (!empty($QA_RELEASES['releases'])) : ?>
38+
<?php $plural = count($QA_RELEASES['releases']) > 1 ? 's' : ''; ?>
39+
40+
<?php foreach ($QA_RELEASES['releases'] as $pversion => $info) : ?>
41+
<h3 class="title">
42+
PHP <?php echo $info['version']; ?>
43+
</h3>
44+
<div class="content-box">
45+
46+
<ul>
47+
<?php foreach ($info['files'] as $file_type => $file_info) : ?>
48+
<li>
49+
<a href="<?php echo $file_info['path'] ?>"><?php echo "php-{$info['version']}.tar.{$file_type}"; ?></a>
50+
<span class="releasedate"><?php echo date('d M Y', strtotime($info['date'])); ?></span>
51+
<?php foreach ($QA_CHECKSUM_TYPES as $algo): ?>
52+
<span class="<?php echo $algo; ?>">
53+
<?php if (isset($file_info[$algo]) && strlen($file_info[$algo])) : ?>
54+
<?php echo $file_info[$algo]; ?>
55+
<?php else: ?>
56+
<em><small>No checksum value available</small></em>)&nbsp;
57+
<?php endif; ?>
58+
<?php endforeach; ?>
59+
</li>
60+
<?php endforeach; ?>
61+
</ul>
62+
<?php endforeach; ?>
63+
<?php else: ?>
64+
<span class='lihack'>There are no QA releases available at the moment to test.</span>
65+
<?php endif; ?>
66+
67+
<p>
68+
<br/>
69+
<strong>Windows users:</strong>
70+
See <a href="https://windows.php.net/qa/">here</a> for the Windows QA builds.
71+
</p>
72+
73+
<?php
74+
site_footer(['sidebar' => $SIDEBAR_DATA]);
75+

0 commit comments

Comments
 (0)