Docs menu
Runtime versions
Choose your PHP version with the php requirement in composer.json, and upgrade it safely.
On this page
Primcloud installs the PHP version your composer.json asks for. The versions you can install are part of the Primcloud Runtime, which supports PHP 8.1 through 8.5 and follows the official PHP release schedule. Each deployment's build log shows the exact version it installed.
Choosing a version#
Set the php requirement in composer.json, using any Composer version constraint:
{
"require": {
"php": "^8.4"
}
}
"^8.4": the newest 8.x release from 8.4 on."~8.4.10": the newest 8.4 release from 8.4.10 on."8.4.*": the newest 8.4 release."8.4.15": exactly 8.4.15. The build fails if that release isn't available.
When a composer.lock exists, the build reads the PHP requirement recorded there, so run composer update after changing composer.json and commit both files.
With no php requirement anywhere, you get the newest supported version, which changes as new versions are released. Set one so production doesn't move under you.
Upgrading#
- Change the
phprequirement incomposer.json, say from"^8.3"to"^8.4". - Run
composer updatelocally to refreshcomposer.lock. - Commit both files and push.
The first build on a new version takes a little longer while it's downloaded. Check the PHP migration guides before moving to a new major; the build won't stop you deploying code that breaks on it.
End-of-life versions#
When a PHP version reaches end-of-life, it's eventually removed from the Primcloud Runtime. Until then, builds on it keep working. Once it's removed, builds that ask for it fail with "Failed to install platform dependencies" until you move to a supported version as described above. Upgrade before the end-of-life date to avoid an upgrade under pressure.