deployment and operations

Safe PHP Upgrades

PHP upgrades are routine maintenance. Plan runtime compatibility, dependency support, extensions, deprecations, tests, staging rollout, metrics, and rollback before production changes.

Inventory Every Runtime Surface

  • Inventory runtime versions across local, CI, staging, production, containers, and workers.
  • Review migration guides and dependency compatibility.
  • Run tests and deprecation checks on target PHP.

Exercise The Target Version

  • Update CI matrix.
  • Deploy staging canary.
  • Observe logs, metrics, and rollback path.

Include Extensions And Workers

  • CLI and FPM can run different PHP versions.
  • Extensions may lag behind runtime.
  • A passing smoke test may miss background workers.

Upgrade Matrix

surface        current   target   verified
CLI            8.x       8.y      tests and commands
PHP-FPM        8.x       8.y      staging traffic
workers        8.x       8.y      queued jobs
CI             8.x       8.y      full matrix
extensions     list      list     compatibility checked

The upgrade is ready when all runtime surfaces are verified and rollback is rehearsed. Read every intervening official migration guide and test the application under the target runtime; a package-manager update alone is not an application upgrade plan.

Practice

Practice: Plan A PHP Runtime Upgrade

Plan an application upgrade from one supported PHP branch to another. Include every runtime surface that could remain on the old version accidentally.

Requirements

  • Inventory runtime versions across local, CI, staging, production, containers, and workers.
  • Review migration guides and dependency compatibility.
  • Run tests and deprecation checks on target PHP.
  • Update CI matrix.
  • Deploy staging canary.
  • Observe logs, metrics, and rollback path.
Show solution

Inventory local CLI, CI, staging, production FPM, containers, scheduled commands, workers, and extensions. Read every intervening official migration guide, confirm dependency support, and run tests plus deprecation checks on the target version.

Update the CI matrix, deploy to staging, exercise web and worker paths, inspect logs and metrics, and rehearse rollback. Do not assume that upgrading CLI also upgraded FPM or long-running processes.