Quick one. If a business site still runs PHP 8.2, when does support really end? And is it better to jump straight to 8.6 when it ships, or go to 8.4/8.5 now?
QuestionPHP 8.2 end of life: what's the actual deadline and what to target?
Dates I found:
1. PHP 8.2 end of life is 31.12.2026. After this no more security fixes.
2. PHP 8.6 is planned for 19.11.2026 (https://wiki.php.net/todo/php86).
3. PHP 8.5 came out 20.11.2025.
So there is time, but not much, maybe two months.
I'd go to 8.4 or 8.5 now rather than wait for 8.6. A brand new major in late November leaves only a few weeks before the 8.2 deadline, and libraries, hosting panels and Docker images usually need a little time to catch up.
Composer can tell you what blocks an upgrade:
composer why-not php 8.5 composer outdated --direct
And pin the target in composer.json, so composer update resolves packages for the server's version, not your laptop's:
{
"config": {
"platform": { "php": "8.5.0" }
}
}Is there a way to find deprecated things in the code automatically, rather than clicking through the whole site and hoping?
>>5
A few layers, cheapest first:
# syntax check of every file with the new version, in a throwaway container docker run --rm -v "$PWD":/app -w /app php:8.5-cli \ sh -c "find . -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l"
Then static analysis: PHPStan with phpVersion: 80500 in phpstan.neon reports code that does not fit that version. And finally your tests (or at least the main pages) on the new version with error_reporting(E_ALL) and logging on, so deprecations show up in the log.
Update: php.net published a critical release 21–23.10 (8.5.12 / 8.4.27 / 8.3.36 / 8.2.35, remote code execution without login). 8.2 also got the fix, but it does not change the end of year date. https://www.php.net/archive/2026.php
Only signed-in members can write. Sign in