Author: Shivam Mathur (shivammathur)
Date: 2025-07-31T03:06:33+05:30

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

Improve download instructions

Changed paths:
  M  include/download-instructions/linux-debian-cli-community.php
  M  include/download-instructions/linux-debian-cli-default.php
  M  include/download-instructions/linux-fedora-cli-community.php
  M  include/download-instructions/linux-fedora-cli-default.php
  M  include/download-instructions/linux-ubuntu-cli-community.php
  M  include/download-instructions/linux-ubuntu-cli-default.php
  M  include/download-instructions/osx-homebrew-php.php
  M  include/download-instructions/osx-homebrew.php
  M  include/download-instructions/osx-macports.php
  M  include/download-instructions/windows-chocolatey.php
  M  include/download-instructions/windows-native.php
  M  include/download-instructions/windows-scoop.php


Diff:

diff --git a/include/download-instructions/linux-debian-cli-community.php 
b/include/download-instructions/linux-debian-cli-community.php
index e2f18db4d5..b73827fd13 100644
--- a/include/download-instructions/linux-debian-cli-community.php
+++ b/include/download-instructions/linux-debian-cli-community.php
@@ -2,11 +2,9 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-bash line-numbers">
-sudo apt-get update
-sudo apt-get install -y lsb-release ca-certificates apt-transport-https curl
-sudo curl -sSLo /tmp/debsuryorg-archive-keyring.deb 
https://packages.sury.org/debsuryorg-archive-keyring.deb
-sudo dpkg -i /tmp/debsuryorg-archive-keyring.deb
-sudo sh -c 'echo "deb 
[signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] 
https://packages.sury.org/php/ $(lsb_release -sc) main" &gt; 
/etc/apt/sources.list.d/php.list'
-sudo apt-get update
+# Add the packages.sury.org/php repository.
+curl -sSL https://packages.sury.org/php/README.txt | sudo bash -x
+
+# Install PHP.
 sudo apt-get install -y php<?= $version; ?>
 </code></pre>
diff --git a/include/download-instructions/linux-debian-cli-default.php 
b/include/download-instructions/linux-debian-cli-default.php
index 3749335cea..534da00616 100644
--- a/include/download-instructions/linux-debian-cli-default.php
+++ b/include/download-instructions/linux-debian-cli-default.php
@@ -2,6 +2,9 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-bash line-numbers">
+# Update the package lists.
 sudo apt update
+
+# Install PHP.
 sudo apt install -y php
 </code></pre>
diff --git a/include/download-instructions/linux-fedora-cli-community.php 
b/include/download-instructions/linux-fedora-cli-community.php
index 6d71e44883..3f414122c5 100644
--- a/include/download-instructions/linux-fedora-cli-community.php
+++ b/include/download-instructions/linux-fedora-cli-community.php
@@ -2,9 +2,12 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-bash line-numbers">
+# Add the Remi's RPM repository.
 sudo dnf install -y dnf-plugins-core
 sudo dnf install -y https://rpms.remirepo.net/fedora/remi-release-$(rpm -E 
%fedora).rpm
 sudo dnf module reset php -y
 sudo dnf module enable php:remi-<?= $version; ?> -y
+
+# Install PHP.
 sudo dnf install -y php
 </code></pre>
diff --git a/include/download-instructions/linux-fedora-cli-default.php 
b/include/download-instructions/linux-fedora-cli-default.php
index 1d8f5997dc..61d64d3c50 100644
--- a/include/download-instructions/linux-fedora-cli-default.php
+++ b/include/download-instructions/linux-fedora-cli-default.php
@@ -2,5 +2,6 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-bash line-numbers">
+# Install PHP.
 sudo dnf install -y php
 </code></pre>
diff --git a/include/download-instructions/linux-ubuntu-cli-community.php 
b/include/download-instructions/linux-ubuntu-cli-community.php
index 6bce01b7a6..100666c8ea 100644
--- a/include/download-instructions/linux-ubuntu-cli-community.php
+++ b/include/download-instructions/linux-ubuntu-cli-community.php
@@ -2,9 +2,12 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-bash line-numbers">
+# Add the ondrej/php repository.
 sudo apt update
 sudo apt install -y software-properties-common
-sudo add-apt-repository ppa:ondrej/php -y
+sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y
 sudo apt update
+
+# Install PHP.
 sudo apt install -y php<?= $version; ?>
 </code></pre>
diff --git a/include/download-instructions/linux-ubuntu-cli-default.php 
b/include/download-instructions/linux-ubuntu-cli-default.php
index 3749335cea..534da00616 100644
--- a/include/download-instructions/linux-ubuntu-cli-default.php
+++ b/include/download-instructions/linux-ubuntu-cli-default.php
@@ -2,6 +2,9 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-bash line-numbers">
+# Update the package lists.
 sudo apt update
+
+# Install PHP.
 sudo apt install -y php
 </code></pre>
diff --git a/include/download-instructions/osx-homebrew-php.php 
b/include/download-instructions/osx-homebrew-php.php
index 3a65fe52f8..5fd20fc401 100644
--- a/include/download-instructions/osx-homebrew-php.php
+++ b/include/download-instructions/osx-homebrew-php.php
@@ -2,8 +2,11 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-bash line-numbers">
-brew tap shivammathur/php
-brew install php@<?= $version; ?>
+# Download and install Homebrew.
+curl -o- https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | 
bash
+
+# Install and link PHP.
+brew install shivammathur/php/php@<?= $version; ?>
 
 brew link --force --overwrite php@<?= $version; ?>
 </code></pre>
diff --git a/include/download-instructions/osx-homebrew.php 
b/include/download-instructions/osx-homebrew.php
index 050013640c..bc2f033cac 100644
--- a/include/download-instructions/osx-homebrew.php
+++ b/include/download-instructions/osx-homebrew.php
@@ -2,6 +2,10 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-bash line-numbers">
+# Download and install Homebrew.
+curl -o- https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | 
bash
+
+# Install and link PHP.
 brew install php@<?= $version; ?>
 
 brew link --force --overwrite php@<?= $version; ?>
diff --git a/include/download-instructions/osx-macports.php 
b/include/download-instructions/osx-macports.php
index bf716f8f98..057c940465 100644
--- a/include/download-instructions/osx-macports.php
+++ b/include/download-instructions/osx-macports.php
@@ -2,5 +2,6 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-bash line-numbers">
+# Please refer to https://guide.macports.org/chunked/installing.macports.html 
for installing MacPorts.
 sudo port install php<?= $versionNoDot; ?>
 </code></pre>
diff --git a/include/download-instructions/windows-chocolatey.php 
b/include/download-instructions/windows-chocolatey.php
index 804d029c15..56c6205465 100644
--- a/include/download-instructions/windows-chocolatey.php
+++ b/include/download-instructions/windows-chocolatey.php
@@ -2,5 +2,9 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-powershell line-numbers">
+# Download and install Chocolatey.
+powershell -c "irm https://community.chocolatey.org/install.ps1|iex"
+
+# Download and install PHP.
 choco install php --version=<?= $version; ?> -y
 </code></pre>
diff --git a/include/download-instructions/windows-native.php 
b/include/download-instructions/windows-native.php
index 52ef1412ea..c420f0a4cc 100644
--- a/include/download-instructions/windows-native.php
+++ b/include/download-instructions/windows-native.php
@@ -2,5 +2,6 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-powershell line-numbers">
+# Download and install PHP.
 powershell -c "& ([ScriptBlock]::Create((irm 
'https://php.net/install/windows.ps1'))) -Version <?= $version; ?>"
 </code></pre>
diff --git a/include/download-instructions/windows-scoop.php 
b/include/download-instructions/windows-scoop.php
index 2b8e35eb47..b95b7d1992 100644
--- a/include/download-instructions/windows-scoop.php
+++ b/include/download-instructions/windows-scoop.php
@@ -2,5 +2,10 @@
 On the command line, run the following commands:
 </p>
 <pre><code class="language-powershell line-numbers">
-scoop install php@<?= $version; ?>
+# Download and install Scoop.
+powershell -c "irm https://get.scoop.sh | iex"
+
+# Download and install PHP.
+scoop bucket add versions
+scoop install php<?= $versionNoDot; ?>
 </code></pre>

Reply via email to