ВопросPHP 8.2 end of life: what's the actual deadline and what to target?

D David Участник Регистрация: 22 авг. 2026 г.
Сообщений: 3
#1

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?

TP Tomasz P. Участник Регистрация: 30 июн. 2026 г.
Сообщений: 84
#2

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.

IS Irakli S. Участник Регистрация: 18 сент. 2026 г.
Сообщений: 44
#3

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" }
    }
}
KW Kate W. Участник Регистрация: 4 сент. 2026 г.
Сообщений: 20
#4

Is there a way to find deprecated things in the code automatically, rather than clicking through the whole site and hoping?

IS Irakli S. Участник Регистрация: 18 сент. 2026 г.
Сообщений: 44
#5

>>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.

TP Tomasz P. Участник Регистрация: 30 июн. 2026 г.
Сообщений: 84
#6

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

Быстрый ответ

Писать могут только вошедшие участники. Войти