Skip to content
PHP 8.2 security support ends Dec 31, 2026. Is your site exposed?Get a free assessment →

PHP 8.2 End of Life: A Compatibility Guide Before You Migrate

PHP 8.2 End of Life: A Compatibility Guide Before You Migrate

Short answer: PHP 8.2 stops receiving security fixes on December 31, 2026. Before upgrading an enterprise application, audit four things: the runtime and hosting, Composer dependencies, framework and CMS support, and extensions and integrations. Test everything against PHP 8.4 or 8.5 in staging, fix what breaks, then deploy in stages with a rollback plan.

What changes on December 31, 2026

The PHP project supports each release for four years: two years of active support, then two years of security fixes only. According to the official supported-versions schedule on php.net, PHP 8.2 reaches end of life on December 31, 2026. After that date, newly discovered vulnerabilities in PHP 8.2 will not be patched by the PHP project.

  • PHP 8.3: security fixes only, until December 31, 2027.
  • PHP 8.4: supported until December 31, 2028.
  • PHP 8.5: released November 20, 2025, supported until December 31, 2029.

For most enterprise applications the practical target is PHP 8.4 or 8.5. Moving to 8.3 buys only one more year.

Step 1: Inventory the runtime and hosting

List every place PHP runs: web servers, background workers, cron jobs, CLI scripts, containers and CI pipelines. Note the exact PHP version and how it is installed (OS packages, containers, managed hosting). Many upgrades stall because one forgotten worker or build image still pins the old version.

Step 2: Audit Composer dependencies

Dependencies are where most upgrade blockers hide. Run composer outdated to see what is behind, and composer why-not php 8.4 to find packages that block the target version. Abandoned packages need a replacement plan before the upgrade, not during it.

Step 3: Check framework and CMS support

Confirm that your framework or CMS version supports the target PHP version. Laravel, Symfony, WordPress, Drupal and Magento each publish their own compatibility matrix; an old framework major version may require a framework upgrade first, which changes the size of the project.

Step 4: Review extensions and integrations

Check every PHP extension the application loads, especially PECL extensions and vendor SDKs for payments, search, queues or monitoring. Then list external integrations: APIs, webhooks and file exchanges that could behave differently after the upgrade.

Step 5: Scan the code and test in staging

Static analysis finds most incompatibilities before runtime. PHPCompatibility (a PHP_CodeSniffer standard) flags removed and deprecated features, and Rector can apply many fixes automatically. Common issues when leaving PHP 8.2 include:

  • Dynamic properties, deprecated since PHP 8.2, that older code creates on objects.
  • Implicitly nullable parameter types, deprecated in PHP 8.4.
  • ${var} string interpolation and utf8_encode()/utf8_decode(), deprecated since PHP 8.2.

Run the full test suite on the target version with deprecation logging enabled, and compare error logs against the current production baseline.

Step 6: Deploy in stages with a rollback plan

Upgrade a staging environment first, then a small share of production traffic or one non-critical service, and keep the previous runtime available until monitoring confirms stability. Define in advance what triggers a rollback and how long it takes.

Upgrade, or retire PHP from that system?

For a custom application, upgrading PHP is usually the right move. For a marketing website on a PHP-based CMS, it can be the moment to ask whether you want to keep patching a runtime at all. Our Leave PHP Behind assessment covers both paths: patch now, then decide whether to migrate.

Frequently asked questions

When does PHP 8.2 reach end of life?

On December 31, 2026, according to the official PHP supported-versions schedule. After that date the PHP project publishes no more security fixes for 8.2.

Which PHP version should we upgrade to from 8.2?

PHP 8.4 or 8.5. PHP 8.4 is supported until December 31, 2028 and PHP 8.5 until December 31, 2029. PHP 8.3 is already security-only and ends on December 31, 2027.

What breaks most often when upgrading from PHP 8.2?

Outdated Composer packages, framework versions that don't support the new PHP release, unmaintained extensions, and deprecated features such as dynamic properties and implicitly nullable parameter types.

Leave PHP Behind

Patch This Week. Plan the Move This Quarter.

Free assessment. Reply within 24 hours.