Describe the issue or problem
Running php tools/upgrade.php upgrade completes all migrations successfully (log shows every migration step through Installer::addPluginVersions), but the process then exits with code 255 and prints nothing further — no “Successfully upgraded to version…” message, no error, no stack trace, nothing in PHP’s error log or stderr.
Steps I took leading up to the issue
upgrading OJS 3.5.0.5 from 3.5.0.4
Root cause isolated:
The core Upgrade/Installer::execute() sequence (preInstall → parseInstaller → executeInstaller → postInstall → updateVersion) completes correctly and returns true. We confirmed this by calling execute() directly in an isolated PHP script, bypassing PKP\cliTool\UpgradeTool, and it ran clean end-to-end, including postInstall, getNotes(), getNewVersion(), and getVersionString() — all returned expected values with exit code 0. The versions table was correctly updated to build 5 (current=1).
The failure is therefore isolated specifically to PKP\cliTool\UpgradeTool::upgrade() (in lib/pkp/classes/cliTool/UpgradeTool.php), somewhere between $installer->execute() returning true and the final printf("Successfully upgraded...") line — but we could not reproduce the crash when manually replicating that exact same sequence in a standalone script. This suggests something specific to how the CLI tool wrapper (tools/upgrade.php → UpgradeTool::__construct/execute) is invoked or how $argv/CommandLineTool parent behavior interacts on this environment — not a database or migration defect.
Impact: Cosmetic/reporting-layer only in our case — the upgrade itself succeeded and the version registered correctly in the DB. But the exit 255 with zero diagnostic output is misleading and could cause admins to believe the upgrade failed and attempt unnecessary remediation (rollback, re-running against an already-upgraded DB, etc.), especially since set_time_limit(0) and normal error handling don’t surface anything.
Request: Could the team confirm whether there’s a known issue in UpgradeTool::upgrade() around the final success-reporting block on PHP 8.3, or advise what additional diagnostics would help pinpoint it? Happy to provide full reproduction steps/logs if useful.
What application are you using?
OJS 3.3.0-5
Additional information
Environment:
- OJS 3.5.0.5 (upgrading from 3.5.0.4)
- PHP 8.3.30 (CLI + FPM)
- MariaDB 11.8.8
- Shared hosting (Hostinger / CloudLinux)