Skip to main content

Cloudsoft Zone Build, deploy and scale with practical guides to PHP, Node.js, React, DevOps and AI automation. Explore the guides

Cloudsoft Zone
PHPResource guide

PHP 8.2 reaches end of life on 31 December 2026: an upgrade checklist

PHP 8.2 stops receiving security fixes on 31 December 2026. Here is the current support table from php.net, how to choose between PHP 8.4 and 8.5, and a step-by-step checklist for a safe upgrade.

Cloudsoft Zone

9 min read

Rows of open black server racks with patch panels in a bright data centre with a raised floor
Photograph: Carl Lender from Sunrise, USA / CC BY 2.0, via Wikimedia Commons
In this article

PHP 8.2 receives its last security fixes on 31 December 2026. After that date the PHP project stops publishing patches for the 8.2 branch, so any server still running it will collect unfixed vulnerabilities from January 2027 onwards. If you run a SaaS product, a client site or an internal tool on 8.2, the upgrade now has a fixed deadline.

The good news is that the step from 8.2 to a current branch is usually smaller than the jump from PHP 7 to PHP 8 was. Most of the work is finding deprecated patterns, checking that your Composer dependencies support the new version and testing in a staging environment before you switch production.

This guide gives you the current support picture as published on php.net on 7 October 2026, helps you choose a target version, and then walks through a practical checklist you can copy into your own ticket tracker.

Which PHP versions are supported in October 2026

The official supported-versions page lists four branches today. As the dates show, each branch gets about two years of active support (bug and security fixes with regular point releases) followed by about two years of security-only fixes, which the PHP project releases as needed.

BranchInitial releaseActive support untilSecurity support untilLatest release (24 Sep 2026)
8.28 Dec 202231 Dec 202431 Dec 20268.2.34
8.323 Nov 202331 Dec 202531 Dec 20278.3.35
8.421 Nov 202431 Dec 202631 Dec 20288.4.26
8.520 Nov 202531 Dec 202731 Dec 20298.5.11

All four point releases listed above were published on 24 September 2026 and were announced as security releases, so if you are on any supported branch, the first action is simply to apply the latest patch.

PHP 8.6 is not yet stable. Release candidate 2 was published on 24 September 2026, and the PHP 8.6 release schedule on the PHP wiki targets general availability on 19 November 2026. Release candidates are for testing only; do not deploy them to production.

Technician in a plaid shirt crouching beside a server rack with a laptop on the floor
Inventory every host that runs PHP, including workers and cron machines, before planning the upgrade.

Choosing your target: 8.4 or 8.5

If you are leaving 8.2, you can technically move to 8.3, but it only buys security support until the end of 2027. For most teams the realistic choice is between 8.4 and 8.5.

  • PHP 8.5 is in active support until 31 December 2027 and receives security fixes until 31 December 2029. It has been stable for almost a year and has had eleven patch releases. Choose it if your framework, CMS and key libraries declare support for it.
  • PHP 8.4 leaves active support on 31 December 2026 but stays on security support until 31 December 2028. It is a sensible target if an important dependency has not yet confirmed 8.5 compatibility.
  • PHP 8.6 is worth testing in CI now so that your next upgrade is easier, but wait for the stable release and the first few patch releases before you plan production use.

Whichever version you choose, check the require section of your framework's or CMS's own composer.json and its release notes rather than relying on blog posts. That is the single most common blocker.

The upgrade checklist

Work through these steps in order. Each one is small, and doing them in sequence keeps surprises out of production.

1. Take an inventory

  • List every place PHP runs: web servers, PHP-FPM pools, queue workers, cron jobs, CLI scripts, Docker base images and CI runners. A forgotten cron host on 8.2 is a common gap.
  • Record the exact version on each host with php -v, and the loaded extensions with php -m.
  • Note where PHP comes from: the operating system's packages, a third-party repository, an official Docker image or your hosting provider's control panel. That determines how you will install the new version.

2. Tell Composer about the target version

Composer resolves dependencies against the PHP version it is running on unless you tell it otherwise. During the upgrade, raise the PHP requirement in your project and, if your local machine runs a different version from production, pin the platform version in the config section:

JSON
{
    "require": {
        "php": "^8.4"
    },
    "config": {
        "platform": {
            "php": "8.4.26"
        }
    }
}

The Composer documentation warns that a faked platform version means dependencies are no longer checked against the PHP you actually run, so it recommends also running composer check-platform-reqs as part of your deployment. Do that on the target server image before you switch traffic.

3. Update dependencies

  • Run composer outdated --direct to see which of your direct dependencies have newer releases.
  • Update your framework first, following its own upgrade guide, then the rest of the packages.
  • Run composer audit afterwards to make sure none of the versions you landed on has a known security advisory.

4. Fix deprecations before they become errors

Deprecation notices are the PHP project's advance warning of future breaking changes. Turn them on in development and CI (error_reporting = E_ALL) and log them in staging. The migration guides on php.net list every change. Some that commonly appear when moving from 8.2:

Introduced inChangeWhat to do
8.4Implicitly nullable parameters such as function foo(Bar $b = null) are deprecatedWrite the type as ?Bar or Bar|null
8.4The E_STRICT error level was removed and the constant deprecatedRemove E_STRICT from error-reporting masks
8.4trigger_error() with E_USER_ERROR is deprecatedThrow an exception or call exit() instead
8.4exit() and die() now behave like functions and throw TypeError for invalid typesPass only strings or integers
8.5The backtick operator as an alias of shell_exec() is deprecatedCall shell_exec() or, better, a process library with escaped arguments
8.5Non-canonical casts (boolean), (integer), (double), (binary) are deprecatedUse (bool), (int), (float), (string)
8.5Using null as an array offset is deprecatedUse an explicit key such as an empty string
8.5__sleep() and __wakeup() are soft-deprecatedMove to __serialize() and __unserialize()

The implicitly nullable parameter change is the one most codebases hit, and it is easy to fix mechanically:

PHP
// Deprecated as of PHP 8.4
function sendInvoice(Customer $customer, ?string $note = null, Mailer $mailer = null) {}

// Explicit and future-proof
function sendInvoice(Customer $customer, ?string $note = null, ?Mailer $mailer = null) {}

Static analysis tools and automated refactoring tools can find most of these patterns across a whole codebase. Run them against the target version rather than fixing files by hand.

5. Check behaviour changes, not only deprecations

Some changes in the "backward incompatible changes" sections do not emit a notice first. Moving to 8.5, for example, a warning is now emitted when a float that cannot be represented as an integer is cast to int, destructuring a non-array value with [] or list() now warns, and the disable_classes INI setting has been removed. If your hosting configuration relies on disable_classes, plan another control before you upgrade. Read the full list for every version you are crossing: an upgrade from 8.2 to 8.5 crosses three migration guides (8.3, 8.4 and 8.5).

6. Review the PHP configuration

  • Copy your php.ini and PHP-FPM pool settings across deliberately, rather than reusing an old file without reading it.
  • From PHP 8.5, OPcache is always built into the PHP binary and always loaded; the opcache.enable and opcache.enable_cli settings are still honoured. Review any zend_extension=opcache line carried over from an old configuration, because the build no longer produces a separate opcache.so file, and check the startup log after the switch.
  • The JIT has been disabled by default since PHP 8.4 (opcache.jit=disable). If you want it, enable it explicitly and measure the effect on your own workload.
  • Keep production error display off (display_errors=Off) and logging on.
Close-up of rack-mounted servers with drive bays and numbered rack units in a data centre
Roll the new PHP version out to a few servers first and keep the previous image ready for rollback.

7. Test properly

  • Run your automated test suite on the target version in CI. Add the target version to your CI matrix first, so that both versions are tested while you migrate.
  • Build a staging environment from the same image you will deploy, including the same extensions.
  • Exercise the parts that tests rarely cover: payment callbacks, file uploads, scheduled jobs, PDF generation and email sending.
  • Watch the logs for new warnings and deprecations during a few days of staging use.

8. Roll out and keep a way back

  • Upgrade one server, one pool or a percentage of containers first, and watch error rates and response times.
  • Keep the previous runtime image available for a quick rollback, and make sure database migrations made during the upgrade are compatible with both versions.
  • Upgrade queue workers and cron hosts in the same window, so that the whole application runs on one version.

Shared hosting and managed platforms

If you use shared hosting or a managed platform, you may only need to select a new PHP version in the control panel. The checklist still applies: update dependencies locally against the target version, test on a staging copy if the host provides one, and then switch. Ask your provider which date they will stop offering 8.2, because hosts set their own timelines and some may keep an end-of-life version available longer with their own patches. That does not replace upgrading.

Keeping current after this upgrade

Once you are on 8.4 or 8.5, avoid the next deadline crunch:

  • Apply patch releases routinely. In recent months the PHP project has published them about every four weeks for supported branches.
  • Keep the next minor version in your CI matrix so that incompatibilities appear early.
  • Put the end-of-security-support date of your current branch in your team calendar.
  • Subscribe to the release announcements on php.net.

Summary

PHP 8.2 loses security support on 31 December 2026. For most projects the best target today is PHP 8.5, with 8.4 as a fallback when a dependency is not ready. Take an inventory of every place PHP runs, align Composer with the target version, fix deprecations from each migration guide you cross, review your configuration (especially OPcache in 8.5), test on staging and roll out gradually. Then keep patching, so that the next upgrade is routine rather than urgent.

Frequently asked questions

  • When does PHP 8.2 stop receiving security fixes?

    According to the supported-versions page on php.net, security support for PHP 8.2 ends on 31 December 2026. After that date no further 8.2 releases are planned.

  • Should I upgrade to PHP 8.4 or PHP 8.5?

    For most projects PHP 8.5 is the better target: it has active support until 31 December 2027 and security support until 31 December 2029. Choose 8.4 (security support until 31 December 2028) if a key dependency does not yet support 8.5.

  • Can I use PHP 8.6 in production yet?

    Not yet. In early October 2026 PHP 8.6 is at the release-candidate stage, and the PHP wiki schedule targets general availability on 19 November 2026. Test it in CI, but wait for the stable release before deploying.

  • What is the most common deprecation when moving from PHP 8.2?

    Implicitly nullable parameters, such as function foo(Bar $b = null), are deprecated as of PHP 8.4. Declare the type as ?Bar or Bar|null instead.

Advertise on CloudSoftZone

Your next customer could start right here.

Introduce your tool, product or business to readers exploring technology.

Advertise with us

Explore placements and request a private quote

Sources

  1. Supported Versions — The PHP Group
  2. PHP news: PHP 8.5.11, 8.4.26, 8.3.35, 8.2.34 and 8.6.0 RC2 releases — The PHP Group, 2026-09-24
  3. PHP 8.6 release schedule (todo/php86) — PHP Wiki
  4. Migrating from PHP 8.3.x to PHP 8.4.x: Deprecated Features — PHP Manual
  5. Migrating from PHP 8.3.x to PHP 8.4.x: Backward Incompatible Changes — PHP Manual
  6. Migrating from PHP 8.4.x to PHP 8.5.x: Backward Incompatible Changes — PHP Manual
  7. OPcache runtime configuration — PHP Manual
  8. Composer documentation: Config — Composer

Written with substantial AI assistance. Facts checked against cited sources. Editorial policy.

Comments

No comments yet. Be the first to join the conversation.

Leave a comment

Every comment is read by a moderator before it appears. Your email address is never published; it is used only to contact you about this comment.

Never published. Used only to contact you about this comment.

Loading the security check…

Comments are moderated before publication.