PHP 8.2 End of Life - and how I can help you upgrade
PHP 8.2 is reaching end of life
On 31 December 2026, PHP 8.2 reaches end of life. That is less than a month from now.
PHP 8.2 was released on 8 December 2022. Since then it has had two years of active support, and two years with security fixes only. That period is almost over.
PHP 8.6 was released on 19 November 2026, so there are plenty of newer versions to choose from. If you still run PHP 8.2, now is a good time to look at it. In this post I will go through what end of life means, which version to move to, and how I can help you get there.
What does end of life mean?
End of life means that the PHP project stops releasing fixes for that version. After 31 December 2026 there will be no more security patches for PHP 8.2, as you can see on the supported versions page on php.net.
Your website will not stop working on 1 January. Nothing breaks. That is the tricky part, it just quietly stops being safe.
This means that:
- New security vulnerabilities found in PHP 8.2 will not be fixed
- Hosting providers will remove the version, some even before the deadline and they expect attacks on PHP 8.2 to start right after the official support ends
- Sooner or later the packages you depend on will require a newer PHP version, so you get stuck on old versions of those as well
The last point is easy to forget. Even if your own code is fine, your dependencies move on.
Which version should you move to?
Since PHP 8.4, each version gets two years of active support, and then two years with security fixes only. All the dates end on 31 December. This is where the newer versions stand:
| Version | Released | Active support until | Security fixes until |
|---|---|---|---|
| PHP 8.3 | 23 Nov 2023 | 31 Dec 2025 | 31 Dec 2027 |
| PHP 8.4 | 21 Nov 2024 | 31 Dec 2026 | 31 Dec 2028 |
| PHP 8.5 | 20 Nov 2025 | 31 Dec 2027 | 31 Dec 2029 |
| PHP 8.6 | 19 Nov 2026 | 31 Dec 2028 | 31 Dec 2030 |
PHP 8.3 only has security fixes now, and it ends in 2027. You would be back here in a year, so I would skip it. PHP 8.4 and PHP 8.5 are good choices for most projects. They are stable, and the frameworks and packages have had time to catch up.
PHP 8.6 is the newest, and it was released on 19 November 2026. It brings a few nice things, for example:
- Partial function application
- A new
Time\Durationclass - A polling API for monitoring many streams
- A
clamp()function - Default values for readonly properties
It also changes some defaults for sessions. Strict mode and HttpOnly cookies are now on, and SameSite is set to Lax. For a new project I would happily start on PHP 8.6. For an existing one, I would first check that the framework, the extensions and the hosting are ready for it. You can read more in the PHP 8.6 release announcement.
What does SameSite Lax mean?
SameSite tells the browser when it may send a cookie along with a request. With Lax, the session cookie is sent when the user is on your site, and when they arrive at your site by clicking a link on another site. It is not sent when another site triggers a request in the background, for example by posting a form to your site, or by loading your page in an iframe.
This helps against CSRF attacks, where another site tries to make your logged-in user do something on your site without them knowing. So it is a good default.
Most applications will not notice the change. But it can matter if your session has to work across sites. For example:
- A payment provider or login service that sends the user back to you with a POST request
- Your application embedded in an iframe on another site
- A single sign-on setup that posts back to your application
In those cases the session cookie may not follow along, and the user looks logged out when they come back. If that is you, you can set the value yourself, either in php.ini or with session_set_cookie_params():
session.cookie_samesite = "None"
session.cookie_secure = 1
Browsers only accept SameSite=None on a Secure cookie, so it requires HTTPS. I would only use it if you really need it, and leave Lax for everything else.
What to expect when upgrading
Moving from PHP 8.2 to a newer version is most often not a big rewrite. It is more about knowing what you have, and testing it properly. This is how I usually go about it:
- Check which PHP version you run today, and which versions your
composer.jsonallows - Find out which dependencies are in the way. Composer can tell you, for example with
composer why-not php 8.5 - Update the dependencies that need it
- Add the new PHP version to your CI, so that the tests run on both versions
- Fix the deprecations and errors the tests show you
- Upgrade the staging environment first, and production after that
composer why-not php 8.5
The command lists the packages that do not support the version yet. This means that you know what to look at before you change anything.
PHP 8.6 also deprecates a few things, for example mb_ereg(), mb_split() and spl_object_hash(). If you move to PHP 8.6 it is worth searching your code for those.
And as always, take a backup before you upgrade.
How I can help
I can help you with the upgrade, and it does not matter what you have. It can be everything from a web application to public or private PHP libraries.
I work with PHP and DevOps every day, and I maintain open source PHP myself, so I know how it is to support more than one PHP version at the same time.
Depending on what you need, I can help with:
- Finding out where you are today, and what is in the way of the upgrade
- Updating the dependencies, and replacing the ones that are no longer maintained
- Fixing deprecations and errors in your own code
- Adding the new PHP versions to your CI, so that you can see what works
- Upgrading the staging and production environments, in Docker or on a plain server
- Preparing your library for the new PHP versions, so that your users can upgrade too
You can hand over the whole upgrade, or just the parts that you do not have time for.
Want to hire me?
There is still time to upgrade before 31 December, but it is better to start now than in the last week of the year. Reach out, I would be happy to talk about your project.
The Expert Behind 7th Green
Hi, I'm Tomas Norre Mikkelsen. I’m the owner at 7th Green, and I bring over 20 years of hands-on experience to every project.
When you work with me, you get a developer who understands PHP and TYPO3 deeply—from core development and extension architecture to frontend/backend integrations and DevOps workflows.
This background allows me to bridge the gap between a developer’s need for clarity and a business's need for reliability. I provide full lifecycle support and create automation setups that are efficient, transparent, and easy to maintain, ensuring you never end up with a black box that only works once.