From b758b4d4ea039a0806fdab53f1263ac506fd6750 Mon Sep 17 00:00:00 2001
From: Kevin Boyd
Date: Fri, 15 Aug 2025 22:08:44 -0700
Subject: [PATCH 1/3] Add MacPorts instructions for switching PHP versions
---
downloads-get-instructions.php | 4 ++++
include/download-instructions/osx-macports.php | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/downloads-get-instructions.php b/downloads-get-instructions.php
index aabc617978..b2f389dfa9 100644
--- a/downloads-get-instructions.php
+++ b/downloads-get-instructions.php
@@ -1,12 +1,14 @@
'',
'usage' => '',
'version' => '',
+ 'priorVersion' => $priorPhpVersion,
];
}
@@ -65,6 +67,8 @@
$version = $options['version'];
$versionNoDot = str_replace('.', '', $version);
+$priorVersion = $options['priorVersion'];
+$priorVersionNoDot = str_replace('.', '', $priorPhpVersion);
if (file_exists(__DIR__ . "/include/download-instructions/{$file}.php")) {
include __DIR__ . "/include/download-instructions/{$file}.php";
diff --git a/include/download-instructions/osx-macports.php b/include/download-instructions/osx-macports.php
index 057c940465..a5e79a3c40 100644
--- a/include/download-instructions/osx-macports.php
+++ b/include/download-instructions/osx-macports.php
@@ -4,4 +4,10 @@
# Please refer to https://guide.macports.org/chunked/installing.macports.html for installing MacPorts.
sudo port install php= $versionNoDot; ?>
+
+# To install a previous version:
+sudo port install php= $priorVersionNoDot; ?>
+
+# To switch to a different version:
+sudo port select php php= $priorVersionNoDot; ?>
From 039b87e86065983dec18028db824b880b8f3e58e Mon Sep 17 00:00:00 2001
From: Kevin Boyd
Date: Sat, 16 Aug 2025 09:27:40 -0700
Subject: [PATCH 2/3] Apply PR feedback to remove 'prior version' logic
---
downloads-get-instructions.php | 4 ----
include/download-instructions/osx-macports.php | 9 ++++-----
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/downloads-get-instructions.php b/downloads-get-instructions.php
index b2f389dfa9..aabc617978 100644
--- a/downloads-get-instructions.php
+++ b/downloads-get-instructions.php
@@ -1,14 +1,12 @@
'',
'usage' => '',
'version' => '',
- 'priorVersion' => $priorPhpVersion,
];
}
@@ -67,8 +65,6 @@
$version = $options['version'];
$versionNoDot = str_replace('.', '', $version);
-$priorVersion = $options['priorVersion'];
-$priorVersionNoDot = str_replace('.', '', $priorPhpVersion);
if (file_exists(__DIR__ . "/include/download-instructions/{$file}.php")) {
include __DIR__ . "/include/download-instructions/{$file}.php";
diff --git a/include/download-instructions/osx-macports.php b/include/download-instructions/osx-macports.php
index a5e79a3c40..ae16b43c00 100644
--- a/include/download-instructions/osx-macports.php
+++ b/include/download-instructions/osx-macports.php
@@ -3,11 +3,10 @@
# Please refer to https://guide.macports.org/chunked/installing.macports.html for installing MacPorts.
-sudo port install php= $versionNoDot; ?>
-# To install a previous version:
-sudo port install php= $priorVersionNoDot; ?>
+# Install PHP = $version; ?>
+sudo port install php= $versionNoDot; ?>
-# To switch to a different version:
-sudo port select php php= $priorVersionNoDot; ?>
+# Switch Active PHP = $version; ?> version
+sudo port select php php= $versionNoDot; ?>
From a7445f14a9b5a83ef783302c82842aba1b912572 Mon Sep 17 00:00:00 2001
From: Shivam Mathur
Date: Sun, 17 Aug 2025 00:11:07 +0530
Subject: [PATCH 3/3] Fix spacing on macports instructions
---
include/download-instructions/osx-macports.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/download-instructions/osx-macports.php b/include/download-instructions/osx-macports.php
index ae16b43c00..41a4b7165e 100644
--- a/include/download-instructions/osx-macports.php
+++ b/include/download-instructions/osx-macports.php
@@ -5,8 +5,10 @@
# Please refer to https://guide.macports.org/chunked/installing.macports.html for installing MacPorts.
# Install PHP = $version; ?>
+
sudo port install php= $versionNoDot; ?>
+
# Switch Active PHP = $version; ?> version
sudo port select php php= $versionNoDot; ?>