User tests: Successful: Unsuccessful:
Changed the exit code from 0 (success) to 1 (error) when attempting to install Joomla from CLI without the minimum required PHP version. Currently, the installation script exits with code 0 even when the PHP version check fails, which incorrectly signals success to shell scripts and CI/CD pipelines.
Prerequisites:
Steps to test:
Verify your PHP CLI version:
php -vNavigate to the Joomla installation directory
Run the CLI installation command:
php installation/joomla.phpCheck the exit code immediately after:
echo $?echo $LASTEXITCODEWhen running the CLI installation with PHP < 8.1.0:
$ php installation/joomla.php
Sorry, your PHP version is not supported.
Your command line php needs to be version 8.1.0 or newer to run the Joomla! CLI Tools
The version of PHP currently running this code, at the command line, is PHP version 7.x.x.
...
$ echo $?
0 ← WRONG: indicates successWhen running the CLI installation with PHP < 8.3.0:
$ php installation/joomla.php
Sorry, your PHP version is not supported.
Your command line php needs to be version 8.1.0 or newer to run the Joomla! CLI Tools
The version of PHP currently running this code, at the command line, is PHP version 7.x.x.
...
$ echo $?
1 ← CORRECT: indicates errorPlease select:
Rationale: This is a bug fix that corrects the exit code behavior to match standard Unix/POSIX conventions. No user-facing functionality or documentation is affected.
| Status | New | ⇒ | Pending |
| Category | ⇒ | Installation |
| Title |
|
||||||
I have tested this item ✅ successfully on 20be37b
Tested with PHP 8.0.30 (cli) on windows command line
Tested with ECHO %ERRORLEVEL%
Before
After
| Status | Pending | ⇒ | Ready to Commit |
| Labels |
Added:
bug
PR-5.4-dev
|
||
RTC
| Labels |
Added:
RTC
|
||
✅ Final test before merge with JBT (switched with scripts/php 54 php8.0)
gh pr checkout 46625| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-01-08 13:41:33 |
| Closed_By | ⇒ | muhme |
Thank you @Razzo1987 for your contribution. Thank you @wilsonge for review. Thank you @alikon and @ThomasFinnern for testing.
I have tested this item ✅ successfully on 20be37b
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46625.