# When does your PHP version stop getting security fixes?

How long PHP supports each version from 8.2 to 8.6, what changes on 31 December 2026, and how to move a Laravel app up a version without surprises.

## In short

- PHP supports a version for two years with bug and security fixes and two more years with security fixes only, each period ending on 31 December.
- On 31 December 2026 PHP 8.2 gets no more security fixes at all, and PHP 8.4 moves from full support to security fixes only.
- A version past its end of life keeps running, but the next security flaw found in it stays open, and patching the server around it does not help.
- On Brewless, patch releases within your PHP version arrive by themselves; moving to a newer version is a line in brewless.yml and a deploy, staging first.
- A rollback runs on the PHP version its release was built for, so a version upgrade that goes wrong can be undone without touching brewless.yml.

Every PHP version has an end date, and it is known the day the version comes out. Still, most teams find out when a scanner, an auditor or a client asks why the app runs on a version that no longer gets fixes.

This post lists the dates for every PHP version from 8.2 to 8.6, explains what the two kinds of support mean for a Laravel app, and shows how to move up a version on [Brewless](/) without guessing.

## When does a PHP version stop getting security fixes?

Four years after the year it came out, on 31 December. PHP fixes bugs and security issues in a version for two years, and only security issues for two more; both periods end on the last day of the year. PHP 8.4, released in November 2024, gets full support until 31 December 2026 and security fixes until 31 December 2028.

The rule is PHP's own, on [php.net's supported versions page](https://www.php.net/supported-versions.php). Because it only depends on the release year, you can work out the end date of any version yourself.

## The dates for every version

| Version | Released | Bug and security fixes until | Security fixes until |
| --- | --- | --- | --- |
| PHP 8.2 | 8 December 2022 | 31 December 2024 | 31 December 2026 |
| PHP 8.3 | 23 November 2023 | 31 December 2025 | 31 December 2027 |
| PHP 8.4 | 21 November 2024 | 31 December 2026 | 31 December 2028 |
| PHP 8.5 | 20 November 2025 | 31 December 2027 | 31 December 2029 |
| PHP 8.6 | 19 November 2026 | 31 December 2028 | 31 December 2030 |

Two of these lines change in a few weeks. On 31 December 2026 **PHP 8.2 reaches its end of life**: no more releases of any kind. On the same day **PHP 8.4 moves to security fixes only**.

> [!NOTE]
> The [security update log](https://brewless.eu/patching/log) keeps this table for every version Brewless builds for, with how much time each one has left. Where today falls is worked out in your browser, so the page is never behind.

## What the two kinds of support mean

**Bug and security fixes** is the normal life of a version. Every few weeks a patch release comes out, such as 8.4.28, with fixes for crashes, wrong results and security flaws.

**Security fixes only** means PHP still releases a patch when a security flaw is found, but leaves other bugs alone. For a Laravel app in production that is usually fine: the interpreter does not get less safe, it only stops getting better. It is the moment to plan the move, not to panic.

**End of life** is different. The version keeps running exactly as before, so nothing breaks on 1 January. But the next flaw found in it stays open for good. PHP has had several of those this year, including a remote code execution flaw that [every supported version got a release for](/blog/php-security-release-patched-same-evening) on 19 November. On an unsupported version, there would have been no release to install.

> [!WARNING]
> Patching the server does not cover this. Your host can update the operating system, OpenSSL and the web server, but the PHP interpreter is the part that runs your code, and only a newer PHP release fixes it.

## What Laravel asks of PHP

Laravel sets its own minimum per major version. Laravel 13 needs PHP 8.3 or newer, so an app on Laravel 13 cannot be on 8.2 to begin with. An app still on 8.2 is on an older Laravel too, and moving PHP up often means moving Laravel up with it.

Check what your own dependencies allow before you pick a version. The `php` requirement in `composer.json` is one half; the packages in `composer.lock` are the other, because a package that has not been released for a newer PHP version holds the whole project back.

```bash
composer why-not php 8.5
```

That command names every package that keeps you from a version, and the constraint it sets. Also look for `config.platform.php` in `composer.json`: when it is set, Composer resolves your dependencies for that version instead of the one you run, and an upgrade that works locally can fail in the build.

## What Brewless does by itself, and what it leaves to you

Brewless runs your application on its own base image: FrankenPHP with PHP and the usual extensions. You can choose 8.3, 8.4, 8.5 or 8.6 in `brewless.yml`, and a newer version [as soon as FrankenPHP publishes it](/blog/new-php-versions-by-themselves). A version that cannot be built is refused before anything is built.

Within the version you chose, patch releases come by themselves. Every hour Brewless looks whether PHP published a newer release and scans its images for vulnerabilities rated critical or high. When there is a fix, it builds new images and [puts them under your live release without a rebuild](/blog/security-updates-without-a-rebuild): the same commit, the same variables, production last. Owners and administrators get a mail when every environment is done.

Moving to another minor version is never done for you. A new version can change behaviour your code or your packages rely on, so that stays your choice:

| What | Who does it |
| --- | --- |
| A new patch release of your PHP version, such as 8.4.28 | Brewless, by itself |
| Fixed packages in the image, from Debian or Alpine | Brewless, by itself |
| Moving from one PHP version to the next, such as 8.4 to 8.5 | You, with one line and a deploy |
| Your Composer and npm packages | You, for example [with Dependabot](/blog/keep-laravel-packages-current-with-dependabot) |

An application without a `php` line in `brewless.yml` is built for 8.4, and stays on 8.4 when newer versions come. Nobody changes PHP version without having asked for it. For a new application, `brewless init` writes PHP 8.6, or the newest version your `composer.json` and `composer.lock` allow, and says which package holds it back when that is not 8.6.

## How to move a Laravel app up a version

Treat it like any other change: try it where nobody is waiting for it, then promote it.

1. **Run your tests on the new version locally.** Most breakage shows up here: a deprecation that became an error, an extension that behaves differently, a package that does not install.
2. **Set the version in `brewless.yml`.** Quote it, so YAML does not read `8.5` as a number.

```yaml brewless.yml
organisation: acme
application: shop
framework: laravel
php: "8.5"
```

3. **Look at the plan.** `brewless plan` shows per environment what the file asks for next to what stands, and changes nothing.
4. **Deploy to staging first.** The build runs on the new version too, so Composer resolves your dependencies against the PHP version they will run on.

```bash
brewless deploy staging
```

5. **Then deploy production**, once staging has run for a while with real use.

```bash
brewless deploy production
```

If production misbehaves after the move, a rollback helps without touching the file: it runs on the PHP version that release was built for, whatever `brewless.yml` says now. The database is the exception, as with every rollback: nothing is migrated back, so a migration that shipped with the upgrade stays. See [Rollbacks](https://docs.brewless.eu/deployments/rollbacks).

```bash
brewless rollback production
```

> [!TIP]
> Move one minor version at a time when you are more than one behind. The deprecations of each version are listed in its migration guide on php.net, and they are easier to read one at a time than all at once.

## Which version should you be on now?

For an app in production today, any version with security support left is safe to run. 8.3 and 8.4 still get security fixes for one and two years. 8.5 and 8.6 have full support. 8.2 has a month.

What matters more is that the move is planned before a deadline forces it. A version upgrade on a Tuesday afternoon, staging first, with a rollback ready, is a small change. The same upgrade on the evening of a critical PHP flaw, on a version that no longer gets a fix, is not.

Read more in the documentation on [the PHP version of a release](https://docs.brewless.eu/deployments/deployments#php-version) and [security updates](https://docs.brewless.eu/deployments/security-updates).

## Frequently asked questions

### How long is a PHP version supported?

Four years in total. For two years after its release a version gets bug and security fixes, and for two more years security fixes only. Both periods end on 31 December, so a version released in November 2024 is fully supported until 31 December 2026 and gets security fixes until 31 December 2028.

### What happens to a Laravel app that keeps running on an unsupported PHP version?

Nothing at first. It keeps working, but when a new flaw is found in that PHP version, no fixed release follows. Your host can patch the operating system and the web server, but not the PHP interpreter that runs your code.

### Which PHP versions can I use on Brewless?

8.3, 8.4, 8.5 and 8.6, and a newer version as soon as FrankenPHP publishes an image for it. Without a php line in brewless.yml a release is built for 8.4, and brewless init writes 8.6 for a new application, or the newest version your Composer requirements allow.

### Does Brewless move my app to a newer PHP version by itself?

No. Patch releases within the version you chose, which carry the security fixes, are put under your live release by itself. A new minor version can change behaviour your code relies on, so moving to one stays your choice.

### Where can I see how long my PHP version is still supported?

The public security update log on brewless.eu/patching/log has a table of every PHP version Brewless builds for, with the end of full support and the end of security support, taken from php.net.

Source: https://test.brewless.eu/blog/php-end-of-life-laravel
