Talk to an engineer

PHP 8.2 end of life: December 31, 2026. What to do now

PHP 8.2 security support ends on December 31, 2026. What changes on January 1, how to find every server still running 8.2, which version to upgrade to, and what breaks on the way.

SeaPHP engineering · December 1, 2026

PHP 8.2 reaches end of life on December 31, 2026. From January 1, 2027, the PHP project publishes no more releases for the 8.2 branch, including security fixes. Any vulnerability found in PHP 8.2 after that date stays open unless someone else patches it.

PHP 8.2 was a popular target for upgrades from 7.4 and 8.0, and it is the default PHP in some long-lived Linux distributions, so a large number of production applications run on it today. If yours is one of them, there are about four weeks left to upgrade or arrange cover.

PHP 8.2 support dates

Date
Released December 8, 2022
Active support ended December 31, 2024
Security support ends December 31, 2026

Since the end of 2024, 8.2 has only received security fixes. Bugs that are not security issues have not been fixed on 8.2 for two years already. See the PHP 8.2 page on our end-of-life timeline for the full picture.

What actually changes on January 1, 2027

Nothing visible. The application keeps running exactly as before. What changes is what happens next time a vulnerability is found in PHP:

  • It is fixed in 8.3, 8.4, 8.5 and 8.6, and not in 8.2. The fix is public, which tells attackers exactly what to look for in unpatched versions.
  • Scanners start flagging it. Vulnerability scanners and external attack surface tools report end-of-life runtimes as findings in their own right, so expect them in your next penetration test and customer security questionnaire.
  • Compliance gets harder. PCI DSS, HIPAA risk analyses, SOC 2 and government controls such as NIST SA-22 all treat unsupported software as a risk to remediate. We cover each in PCI DSS 4.0, HIPAA and NIST SA-22.
  • Dependencies move on. Laravel 13 requires PHP 8.3 and Symfony 8 requires PHP 8.4, so staying on 8.2 also means staying on framework versions that will reach their own end of life.

Are you running PHP 8.2? How to find out everywhere

The server you know about is rarely the only one. Check:

  • Web servers and containers. php -v on each host, or php -r 'echo PHP_VERSION;' inside each container image. For images, check the base image tag, such as php:8.2-fpm, in every Dockerfile.
  • The web SAPI, not just the CLI. PHP-FPM can run a different version from the command line. Check phpinfo() on a protected path, or the FPM service name (php8.2-fpm).
  • CI pipelines and build images, which often lag production.
  • Scheduled jobs and workers on separate hosts.
  • Managed hosting and platform settings. Control panels and platform services often pin the PHP version per site.
  • Composer constraints. A "php": "~8.2.0" requirement or a config.platform.php of 8.2 will block an upgrade even when the server is ready.

Our guide to finding every PHP version you run covers this in more detail, including how to get a version count across a large estate.

What about Linux distribution packages?

Some distributions ship PHP 8.2 as their default and support it for longer than the PHP project does. Debian 12 is the common example. If your PHP comes from such a distribution's own repositories and you install its updates, the distribution's security team may continue to backport fixes for the life of that release.

Check two things before relying on that. First, that your PHP really comes from the distribution, not from a third-party repository that follows the PHP project's own end-of-life dates. Second, that your auditors accept distribution backports as "supported"; most do if you can show the vendor's policy. Extensions installed through PECL or compiled by hand are not covered by the distribution either way.

Which version to upgrade to

Target Security support until Choose it when
PHP 8.3 December 31, 2027 You need the smallest possible change now, and will upgrade again next year
PHP 8.4 December 31, 2028 The default choice: mature, widely supported by frameworks and packages
PHP 8.5 December 31, 2029 Your dependencies already support it and you want the longest runway with a proven release
PHP 8.6 December 31, 2030 Only if everything you depend on already declares support; it was released in November 2026

For most teams, PHP 8.4 is the right target this month. It buys two years, its ecosystem support is complete, and the jump from 8.2 is manageable. Go to 8.5 if your Composer dependencies all allow it; that extra year of support is worth having.

What breaks between PHP 8.2 and 8.4

The upgrade from 8.2 is far gentler than the jump from 7.4 to 8.0. The changes that cost time in real projects:

PHP 8.3

  • Calling get_class() and get_parent_class() without arguments is deprecated.
  • Typed class constants arrive. Nothing breaks, but static analysis becomes stricter about constant types in code that is shared with newer projects.
  • Small behavior changes in range(), which now throws for some argument combinations it used to accept, and in some unserialize() edge cases.

PHP 8.4

  • Implicitly nullable parameter types are deprecated. A typed parameter with a null default and no ?, such as function f(Foo $foo = null), must become ?Foo $foo = null. This is the big one: it appears throughout older codebases and many packages. Rector fixes it automatically.
  • E_STRICT is removed, so error handlers that reference it need updating.
  • exit() became a proper function, which changes behavior in a few edge cases with named arguments and strict types.
  • Several extensions moved out of core to PECL, including IMAP, OCI8, PDO_OCI and pspell. If you use them, install them separately or replace them.

Carried over from 8.2's own deprecations

If your application still emits deprecation notices on 8.2, fix them first: dynamic properties (add the property, or #[\AllowDynamicProperties]), ${var} string interpolation, and utf8_encode() and utf8_decode().

A four-week plan

  1. Week 1: inventory and dependencies. List every place 8.2 runs. Run composer why-not php 8.4.0 for each application and update what blocks it.
  2. Week 2: automated fixes. Run Rector with the PHP 8.3 and 8.4 rule sets, and PHPStan or Psalm configured for 8.4. Commit the mechanical changes on their own, so they are easy to review.
  3. Week 3: test on 8.4. Run the test suite and a staging environment on 8.4 with E_DEPRECATED logged. Exercise the paths tests do not cover: scheduled jobs, imports, exports, payment callbacks.
  4. Week 4: roll out. Canary a share of production traffic, compare error rates and response times, then switch the rest. Keep the 8.2 image ready to roll back to for a few days.

Four weeks is realistic for a single, well-tested application. It is not realistic for an estate of dozens of applications, or for code with no tests, over the holiday period.

If you cannot upgrade by December 31

Then the goal is to stay patched while you upgrade properly. Options:

  • Distribution packages, if your PHP comes from a distribution that still supports 8.2, as described above.
  • Long-term support. SeaPHP LTS continues security fixes for PHP 8.2 after December 31, as drop-in builds for the same version, so nothing about the application changes. It is meant as cover for the upgrade, not a reason to skip it.
  • Reduce exposure while you work: put a web application firewall in front, remove unused endpoints and extensions, and restrict admin paths.

If you want the upgrade done for you, our PHP upgrade service runs it incrementally, one version and one release at a time, with LTS covering the gap.

Find out what your PHP estate needs

Tell us which versions you run and where. An engineer replies within one business day.