PHP upgrades used to be an afterthought in Magento projects - until the 8.x series started deprecating the patterns older Magento and extension code relied on. Moving to PHP 8.3 is worthwhile (performance, security support, JIT improvements) and very achievable on current Magento 2.4 releases, provided you check the right things in the right order.
The Support Matrix First
Magento/Adobe Commerce versions support specific PHP versions - check the current system requirements for your exact target release. Current 2.4.x releases support PHP 8.3; older 2.4.x lines top out at 8.1 or 8.2. If you are on an older Magento, the PHP upgrade and the Magento upgrade are one project - do them together, in the Magento-first order, so each step lands on a supported combination.
What Breaks: The Greatest Hits
The failures we see moving codebases from 8.1/8.2 to 8.3:
- Deprecated dynamic properties: code assigning undeclared properties now warns. Mostly extensions and custom modules; usually a quick fix (declare the property), but volume matters
strftime/ date handling leftovers: long deprecated, still lurking in old extensions- Implicit nullable parameters (
function f(string $x = null)): deprecated in 8.4 but already flagged by modern tooling - fix while you are in there - Third-party extensions built for 8.1: the big one. Every extension needs a stated 8.3-compatible version or a test pass
- Composer platform config:
composer.json’sconfig.platform.phppins - update or remove stale pins or Composer will keep resolving dependencies for the old PHP
The Testing Protocol
- Static analysis first: PHPStan or Phan at a pragmatic level over custom code and app/code extensions finds most incompatibilities before runtime
- Staging on the new PHP: same Magento, same data, PHP 8.3. Full smoke test: storefront, checkout, admin, cron, consumers
- CLI and cron paths: cron runs under CLI PHP - a store can serve pages fine on 8.3 while every cron job dies. Test
bin/magento cron:run, indexers, imports and queue consumers explicitly - Error log watch: deprecations and warnings flood logs first; triage them into fix-now vs noise
- Performance sanity: compare response times; 8.3 should be equal or faster - a slowdown means something is throwing exceptions internally
The Rollout
- Upgrade staging, soak for a week with normal staff usage
- Production during a quiet window, with the old PHP-FPM pool still installed for instant rollback at the web server layer - PHP rollback should be a symlink change, not a reinstall
- Watch New Relic / logs for the first day
Worth It
Yes: security support windows close on old PHP versions, and running an ecommerce platform on unmaintained PHP is not a tenable position for long. The 8.3 runtime is also measurably faster than 8.1 in real Magento workloads. Plan it as a small, deliberate project - a week of staged testing - and it is one of the least dramatic upgrades you will do.