PHP 8.2 end of life: what to do before 31 December 2026
PHP 8.2 stops getting security fixes on 31 December 2026. Here is which version to move to, what usually breaks, and a step-by-step upgrade plan.
PHP 8.2 stops receiving security fixes on 31 December 2026. After that date, any new vulnerability found in PHP 8.2 stays open on your server. If your application runs on 8.2 or anything older, now is the time to plan the upgrade.
Which PHP versions are supported#
According to php.net, each PHP release gets two years of active support and then two years of security fixes only. As of November 2026:
| Version | Bug fixes until | Security fixes until |
|---|---|---|
| PHP 8.6 | 31 Dec 2028 | 31 Dec 2030 |
| PHP 8.5 | 31 Dec 2027 | 31 Dec 2029 |
| PHP 8.4 | 31 Dec 2026 | 31 Dec 2028 |
| PHP 8.3 | Ended | 31 Dec 2027 |
| PHP 8.2 | Ended | 31 Dec 2026 |
| PHP 8.1 and older | Ended | Ended |
All of PHP 7 and PHP 5 is already end of life.
Which version should you move to?#
For most applications, PHP 8.4 is the sensible target. It is supported until the end of 2028, and most current packages already run on it. PHP 8.5 gives you an extra year, to the end of 2029. It is a good choice if your dependencies support it. PHP 8.6 was released on 19 November 2026 and is supported to the end of 2030, but give your Composer packages a few months to catch up before moving production to it.
Moving to PHP 8.3 only buys you one more year (to the end of 2027), so you would be doing this again soon.
Your framework matters too. Laravel 13 needs PHP 8.3 or newer, so an app on PHP 8.2 can't move to Laravel 13 until PHP is upgraded. CodeIgniter 3.1.13, the last official CodeIgniter 3 release, officially supports PHP up to 8.1. Running it on 8.2 and newer relies on patches or community forks.
What usually breaks#
Going from 8.2 to 8.4 is normally a small jump. The pain comes from apps that are further behind:
- Removed functions. The old
mysql_*extension,each()andcreate_function()are gone in PHP 8. - Stricter types. Passing
nullto built-in functions that expect a string now raises deprecation notices, and many old warnings are now errors. - Dynamic properties. Deprecated in PHP 8.2. Older framework code, CodeIgniter 3 included, relies on them heavily.
- Old dependencies. Composer packages pinned to old versions often refuse to install on a newer PHP.
- Server differences. The command-line PHP and the web server's PHP can be different versions. Upgrade both.
A safe upgrade plan#
- Find out what you run. Check the PHP version on the server (web and CLI), the framework version, and every Composer package.
- Copy it somewhere safe. Set up a staging copy on the target PHP version. Nothing touches production yet.
- Let tools find the obvious problems. Static analysis (PHPStan or Larastan) and PHPCompatibility checks find most removed functions and type issues before you run the app.
- Put tests around the money paths. Login, checkout, invoicing, reports, anything that would cause support tickets if it broke.
- Fix, then upgrade dependencies. Rector can automate many code changes. Then bring Composer packages up to versions that support the new PHP.
- Test on staging with real-looking data. Click through the flows that matter, and run the scheduled jobs and queues too.
- Switch production with a way back. Keep the old PHP version available on the server until the new one has run cleanly for a while.
If the framework is too old#
Sometimes the PHP upgrade is blocked by the framework. Then you have two choices: upgrade the framework first, or rebuild the app on a current framework one module at a time, on the same database. I compare those routes on the legacy application modernization page.
Need a hand?#
I upgrade PHP 7.x and 8.x applications to PHP 8.4, 8.5 or 8.6 in small, tested steps. See PHP upgrade service. If the app is on Laravel, see Laravel upgrade.
Need help with your project?
Learn more about PHP Upgrade Service for PHP 8.4, 8.5 and 8.6 or get in touch to discuss your project.
More guides from the blog.
Laravel Go vs Laravel Rust: What They Mean for Laravel PHP Developers
Laravel Rust (1 December 2026) and Laravel Go (2 December 2026) are new first-party betas, not add-ons for your PHP app. What shipped, what Laravel's...
How to add an AI chatbot to a Laravel app
A practical plan for adding an AI chatbot to an existing Laravel app: answering from your own data, permissions, queues, logging and a human handoff.