[web-php] move-qa-to-web: Make the layout copy what we have for normal releases

From: Date: Thu, 24 Apr 2025 12:50:59 +0000
Subject: [web-php] move-qa-to-web: Make the layout copy what we have for normal releases
Groups: php.webmaster 
Request: Send a blank email to [email protected] to get a copy of this message
Author: Derick Rethans (derickr)
Date: 2025-04-24T13:40:40+01:00

Commit: https://github.com/php/web-php/commit/bf5b8beb1e795144e8c52205329925d7b1942840
Raw diff: https://github.com/php/web-php/commit/bf5b8beb1e795144e8c52205329925d7b1942840.diff

Make the layout copy what we have for normal releases

Changed paths:
  M  get-involved.php
  M  release-candidates.php


Diff:

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 @@
 <h3 class="content-title" id="ways-to-contribute">Four Best Ways to
Contribute</h3>
 
  <ol class="content-box listed">
-  <li>Running test suites in <a href="https://qa.php.net/">RC</a>
+  <li>Running test suites in <a href="/release-candidates.php">RC</a>
       and <a href="https://php.net/releases">release</a>
distributions of PHP</li>
   <li>Help finding and diagnosing failed tests, see
       the <a href="https://qa.php.net/write-test.php">phpt
documentation</a></li>
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 = '
+<div class="panel">
+  Test Releases
+  <div class="body">
+    The downloads on this page are not meant to be run in production. They are
+    for testing only.
+  </div>
+  <div class="body">
+    If you find a problem when running your library or application with these
+    builds, please file a report on <a
+    href="https://github.com/php/php-src/issues/">GitHub
Issues</a>.
+  </div>
+</div>
+';
+
 site_header("Release Candidates", [
-	'current' => 'downloads',
+    'current' => 'downloads',
 ]);
 
 ?>
 <h1>Release Candidate Builds</h1>
 <p>
-	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.
 </p>
 
 <h3>Available QA Releases:</h3>
-<?php show_release_qa($QA_RELEASES); ?>
+<?php if (!empty($QA_RELEASES['releases'])) : ?>
+  <?php $plural = count($QA_RELEASES['releases']) > 1 ? 's' :
''; ?>
+
+  <?php foreach ($QA_RELEASES['releases'] as $pversion => $info) : ?>
+  <h3 class="title">
+    PHP <?php echo $info['version']; ?>
+  </h3>
+  <div class="content-box">
+
+    <ul>
+      <?php foreach ($info['files'] as $file_type => $file_info) : ?>
+        <li>
+          <?php download_link($file_info['path'],
"php-{$info['version']}.tar.{$file_type}"); ?>
+          <span class="releasedate"><?php echo date('d M Y',
strtotime($info['date'])); ?></span>
+            <?php foreach ($QA_CHECKSUM_TYPES as $algo): ?>
+              <span class="<?php echo $algo; ?>">
+              <?php if (isset($file_info[$algo]) && strlen($file_info[$algo])) : ?>
+                <?php echo $file_info[$algo]; ?>
+              <?php else: ?>
+                <em><small>No checksum value
available</small></em>)&nbsp;
+              <?php endif; ?>
+            <?php endforeach; ?>
+          </li>
+        <?php endforeach; ?>
+      </ul>
+	<?php endforeach; ?>
+<?php else: ?>
+	<span class='lihack'>There are no QA releases available at the moment to
test.</span>
+<?php endif; ?>
+
 <p>
-<br>
-<strong>Windows users:</strong>
-See <a href="https://windows.php.net/qa/">here</a> for
the Windows QA builds.
+	<br/>
+	<strong>Windows users:</strong>
+	See <a href="https://windows.php.net/qa/">here</a> for
the Windows QA builds.
 </p>
-<?php
-
-site_footer();
-
-function show_release_qa($QA_RELEASES) {
-	// The checksum configuration array
-	global $QA_CHECKSUM_TYPES;
-
-	echo "<!-- RELEASE QA -->\n";
-
-	if (!empty($QA_RELEASES['releases'])) {
-
-		$plural = count($QA_RELEASES['releases']) > 1 ? 's' : '';
-
-		// QA Releases
-		echo "<span class='lihack'>\n";
-		echo "Providing QA for the following <a href='/rc.php'>test
release{$plural}</a>:<br> <br>\n";
-		echo "</span>\n";
-		echo "<table>\n";
 
-		foreach ($QA_RELEASES['releases'] as $pversion => $info) {
-
-			echo "<tr>\n";
-			echo "<td colspan=\"" . (sizeof($QA_CHECKSUM_TYPES) + 1) .
"\">\n";
-			echo "<h3 style=\"margin:
0px;\">{$info['version']}</h3>\n";
-			echo "</td>\n";
-			echo "</tr>\n";
-
-			foreach ($info['files'] as $file_type => $file_info) {
-				echo "<tr>\n";
-				echo "<td width=\"20%\"><a
href=\"{$file_info['path']}\">php-{$info['version']}.tar.{$file_type}</a></td>\n";
-
-				foreach ($QA_CHECKSUM_TYPES as $algo) {
-					echo '<td>';
-					echo '<strong>' . strtoupper($algo) . ':</strong> ';
-
-					if (isset($file_info[$algo]) && strlen($file_info[$algo])) {
-						echo $file_info[$algo];
-					} else {
-						echo '(<em><small>No checksum value
available</small></em>)&nbsp;';
-					}
-
-					echo "</td>\n";
-				}
-
-				echo "</tr>\n";
-			}
-		}
-
-		echo "</table>\n";
-	} else {
-		echo "<span class='lihack'>There are no QA releases available at the moment
to test.</span>";
-	}
+<?php
+site_footer(['sidebar' => $SIDEBAR_DATA]);
 
-	echo "<!-- END -->\n";
-}


Thread (1 message)

  • Derick Rethans
« previous php.webmaster (#32866) next »