PHP 8.2 stops getting security fixes on Dec 31, 2026. That is about six weeks from today. After that date, the next flaw found in PHP 8.2 stays open on every server that runs it.
For a Laravel app, the work this needs depends on a second number: the Laravel version. On some versions, moving to a newer PHP is a server change and a test run. On others, the framework cannot run on any PHP that still gets fixes, so the framework has to move first.
This post shows which case you are in, which PHP version to move to, and the checklist we follow before switching a server. If you are still on PHP 8.1, the same steps apply, and its end date passed almost a year ago.
The dates, from php.net
PHP supports each branch for four years: two years of bug and security fixes, then two years of security fixes only. These are the dates on php.net's supported versions and end-of-life pages:
PHP 8.1: security fixes ended Dec 31, 2025.
PHP 8.2: security fixes end Dec 31, 2026.
PHP 8.3: security fixes until Dec 31, 2027.
PHP 8.4: security fixes until Dec 31, 2028.
PHP 8.5: security fixes until Dec 31, 2029.
We saw what this means in October. When the PHP2Shell flaws came out, PHP 8.2 to 8.5 got a patched release on Oct 21 and PHP 8.1 got none. We covered that week in PHP2Shell: patch today, or upgrade first? From January, PHP 8.2 sits in the same row as 8.1.
Which Laravel versions can run a supported PHP
Each Laravel release supports a fixed range of PHP versions. The table below comes from the Laravel 13 release notes for Laravel 10 to 13, and from the Laravel 9 release notes for Laravel 8 and 9. The last column is the framework's own security support, which is a separate clock from PHP's.
| Laravel | PHP supported | Highest PHP | Supported PHP after Dec 31, 2026? | Laravel security fixes until |
|---|---|---|---|---|
| 8 | 7.3 to 8.1 | 8.1 | No | Jan 24, 2023 (ended) |
| 9 | 8.0 to 8.2 | 8.2 | No | Feb 6, 2024 (ended) |
| 10 | 8.1 to 8.3 | 8.3 | Yes, 8.3 (until Dec 31, 2027) | Feb 4, 2025 (ended) |
| 11 | 8.2 to 8.4 | 8.4 | Yes, 8.3 or 8.4 | Mar 12, 2026 (ended) |
| 12 | 8.2 to 8.5 | 8.5 | Yes, 8.3 to 8.5 | Feb 24, 2027 |
| 13 | 8.3 to 8.5 | 8.5 | Yes, it requires 8.3 or newer | Mar 17, 2028 |
Read your row, then the section for it below.
What each row means for your app
Laravel 8 or 9: the framework moves first
Laravel 9 stops at PHP 8.2 and Laravel 8 at PHP 8.1. Neither can run a PHP version that gets fixes in 2027. There is no server-only fix here. The app has to cross at least to Laravel 10, and in practice further, because Laravel 10 itself has had no security fixes since Feb 2025. This is a real upgrade project, done one major version at a time with tests on the flows that handle money and data.
Laravel 10 or 11: PHP can move, the framework is still out of support
A Laravel 10 app can move to PHP 8.3, and a Laravel 11 app to 8.3 or 8.4, without touching the framework version. That is often a small job: check the packages, run the tests, switch the servers.
It solves half the problem. Laravel 10 and 11 no longer get security fixes, so a flaw found in the framework stays open whatever PHP you run. A PHP move before Dec 31 is a sensible first step if a framework upgrade cannot happen in time. Plan the framework upgrade next, and treat the PHP move as the part you can finish this year.
Laravel 12: a server change
Laravel 12 runs on PHP 8.2 to 8.5, so moving off 8.2 is mostly a server and CI change plus a full test run. Laravel 12 has its own date to plan for: its security fixes end Feb 24, 2027.
Laravel 13: you are already off 8.2
Laravel 13 requires PHP 8.3 or newer, so this deadline does not touch you. Check that staging, CI and any old worker server run the same PHP as production.
8.3 or 8.4: we recommend 8.4
Our default, when your Laravel version allows it, is PHP 8.4. It gets security fixes until Dec 31, 2028, a year longer than 8.3, and Laravel 11, 12 and 13 all support it. Moving to 8.3 now usually means doing this work again in about a year.
There are two cases where 8.3 is the right call. On Laravel 10 it is the only supported option. And if composer why-not php 8.4 lists a package that has no 8.4-compatible release yet, 8.3 gets you off 8.2 before Dec 31 while you replace that package. PHP 8.4 also brings its own deprecations (item 6 below), so plan for those in the test run.
PHP 8.5 lasts a year longer again, but only Laravel 12 and 13 support it, and some older packages may not list it yet. For most apps today, 8.4 is the balance between how long it lasts and how much it asks of your code.
The checklist before you switch PHP
This is the order we work in. Most of it happens before any server changes.
Find every PHP install. Web servers (PHP-FPM, Apache), queue and scheduler workers, CI images and Docker base images. On one server the command-line PHP and PHP-FPM can be different builds, so check both.
Read
composer.json. Therequire.phpconstraint must allow the target version. Ifconfig.platform.phpis set, it pins the version Composer resolves packages for, and it has to change too.Ask Composer what blocks you.
composer why-not php 8.4lists the installed packages whose constraints do not allow that PHP version. Each one needs an update, a replacement or a fork.Check PHP extensions. Make sure each extension the app uses (for example
intl,gd,redis,imagick) is installed for the new version on every server.Run the test suite on the target version. Add the new PHP version to CI and run everything there first. No tests on checkout, login or invoicing? Write those first.
Read the deprecation notices. PHP 8.4 deprecates, among others, implicitly nullable parameters (
function foo(Type $a = null)must become?Type $a = null) andtrigger_error()withE_USER_ERROR, per the PHP 8.4 migration guide. These raise deprecation notices, not errors, but they fill logs and some test setups fail on them. Rector can make most of these changes for you.Switch staging, then production. Keep the old PHP version installed until the new one has run a full business cycle, so you can roll back.
Restart every PHP process and confirm the version on the web server itself, not only on the command line.
Item 3 is where the surprises are. A payment or PDF package that has not had a release in two years can turn a small PHP move into a framework upgrade. We cover how that changes the price in what a Laravel upgrade costs.
Why tests decide how long this takes
Marafiq, the training platform we built and maintain with a team of 2, runs Laravel 13 with about 940 automated tests. When its PHP or a dependency changes, those tests show within minutes whether certificates, checkout and quizzes still work. A PHP version change on an app like that is a short, planned task. Read the Marafiq case study.
The opposite is common: for example, a customer portal on Laravel 9 and PHP 8.2, with no tests, where nobody knows which packages hold the billing together. That app cannot reach a supported PHP without a framework upgrade, and every step has to be checked by hand until someone writes the tests.
With tests, a PHP move on Laravel 10, 11 or 12 usually fits in the weeks left. On Laravel 8 or 9 with no tests, it is tight. If that is your case, the realistic plan is to start the upgrade now and reduce exposure meanwhile: put staff-only apps behind a VPN or an IP allowlist, and keep an eye on PHP's security announcements.
When you can wait
Not every app needs this before Dec 31. An internal tool with no sensitive data, reachable only from your office network, carries less risk on an unsupported PHP than a public checkout does. Some managed hosts and Linux distributions also ship backported security fixes for older PHP versions. That buys time for PHP alone. Laravel and your packages still need their own fixes, and the backports end when that vendor's support ends. Whatever you decide, write down the PHP version each app runs and its end date, as we suggest for any support plan in what happens after your software launches.
Next step: a free upgrade check
Send us your composer.lock and we will do a free upgrade check: your Laravel and PHP versions, which packages block the move, and whether you need a PHP change or a framework upgrade. Laravel upgrades start from $1k, and we quote after the check. Book a short intro call and bring your composer.lock.

