PHP development blog ·

PHP 8.2 end of life on 31 Dec 2026: what it means and how to upgrade

At the end of 2026, PHP 8.2 stops receiving security fixes. We sum up what it means for running your application, what changed between PHP 8.2 and 8.4 and how to plan the upgrade.

What exactly ends on 31 December 2026

PHP 8.2 was released in December 2022. Active support (regular bug fixes) ended at the end of 2024, and since then the version has only received security patches. Those end on 31 December 2026 as well. From January 2027, no fix will be released for PHP 8.2, even if a serious vulnerability is found.

Your application won't stop working on 1 January. The problems arrive gradually, and usually at the worst possible moment:

  • Security: newly discovered bugs in PHP stay open. Attackers target unsupported versions precisely because nobody patches them. The two critical PHP updates of autumn 2026 showed how fast this can happen.
  • Hosting: providers first charge extra for old versions or mark them as unsupported, and later switch them off. The application then moves to a newer PHP and often breaks overnight.
  • Libraries: new versions of Composer packages no longer support PHP 8.2 (Symfony 8, for example, requires PHP 8.4). Without upgrading PHP, you can't even install a security fix for a library.
  • Liability: anyone running an application that processes personal data must keep it reasonably secure. Software without security updates is hard to defend in an audit or after an incident.

Support for each PHP version

VersionEnd of security supportStatus in December 2026
PHP 7.4 and olderNovember 2022unsupported
PHP 8.026 Nov 2023unsupported
PHP 8.131 Dec 2025unsupported
PHP 8.231 Dec 2026ending
PHP 8.331 Dec 2027security fixes only
PHP 8.431 Dec 2028recommended
PHP 8.531 Dec 2029recommended
PHP 8.631 Dec 2030new release (19 Nov 2026)

If you're upgrading anyway, it's not worth stopping at PHP 8.3. Its support ends in a year and you would repeat the whole exercise. A sensible target is PHP 8.4, or 8.5 if all the libraries your application uses support it. PHP 8.6 only came out in November 2026, and many libraries may not support it yet.

How to find out which PHP version your application uses

  • in your hosting control panel, usually in the website or domain settings
  • on the server with php -v (note that the web server may use a different version than the command line)
  • in the application's composer.json, under "require": {"php": …}, which shows which version the application expects

What changed between PHP 8.2 and 8.4

Moving from 8.2 is much easier than the old jump from PHP 7 to 8. Most changes are deprecation warnings: they don't break the application right away, but they flood the logs and will become errors in PHP 9. The ones you'll hit most often:

  • Implicitly nullable parameters (PHP 8.4): writing Type $x = null without a question mark is deprecated. A typical application has tens to hundreds of these.
  • Removed extensions (PHP 8.4): IMAP, OCI8 and PDO_OCI are no longer part of PHP and have to be installed from PECL or replaced with a library.
  • Calls without arguments (PHP 8.3): get_class() and get_parent_class() without a parameter are deprecated.
  • String increments (PHP 8.3): $s++ on an empty or non-alphanumeric string is deprecated; use the new str_increment() function for alphanumeric increments.
  • Errors via E_USER_ERROR (PHP 8.4): trigger_error(…, E_USER_ERROR) is deprecated; throw an exception instead.

Fixing an implicitly nullable parameter looks like this:

// PHP 8.4: Deprecated
function send(Message $message = null): void {}

// correct
function send(?Message $message = null): void {}

Upgrading isn't only about fixes, though. PHP 8.3 and 8.4 added typed class constants, the #[\Override] attribute, property hooks, asymmetric visibility and functions such as array_find(), all of which make further development simpler.

An upgrade process that works for us

  1. Inventory: we check the PHP version on every environment and go through composer.json. Running composer why-not php 8.4 shows which libraries block the new version.
  2. Automated analysis: PHPStan finds incompatible code and Rector fixes much of it automatically.
  3. Library updates: step by step, one major framework version at a time, not everything at once.
  4. Testing on a copy: we run the application on the new PHP outside production and go through the key scenarios. Critical parts get automated tests.
  5. Deployment and monitoring: after the switch we watch the error logs and fix any problems straight away.

Rector needs only a short configuration to move the code to PHP 8.4 syntax:

// rector.php
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withPaths([__DIR__ . '/app', __DIR__ . '/src'])
    ->withPhpSets(php84: true);

Always review what Rector changes. It rewrites code mechanically and doesn't know your application's business rules.

How long an upgrade takes

We usually move a smaller application on PHP 8.2 with maintained libraries to 8.4 within a few days. Applications on PHP 7.x, with unmaintained libraries or without tests take longer. For those, the first step is often taking over and stabilising the application. With only a few weeks left in 2026, it makes sense to plan the upgrade now, even if it's finished early in the new year.

Running an application on PHP 8.2 or older and not sure how hard the move will be? See how we handle PHP upgrades, or describe your application in the form below and we'll get back to you with an estimate.

Related

Contact us


Send us an enquiry when we are not available on the phone