# New PHP versions on Brewless as soon as FrankenPHP has them

How a new PHP version, such as 8.7, becomes available on Brewless by itself: the images are built, brewless.yml accepts it, and you choose when to move.

## In short

- A new PHP version becomes available on Brewless by itself once FrankenPHP publishes an image for it, without a release of Brewless.
- The hourly workflow in brewless/images that rolls out security patches also looks for the next PHP version, builds base images for it and tells Brewless.
- Brewless reads the published images itself and accepts the new version in brewless.yml from then on; owners and administrators get one mail that it can be used.
- Nothing moves to a new version by itself, because a new PHP version can change behaviour your code relies on; patch releases within your version keep coming automatically.
- A new version that does not build is not published, and the workflow tries again every hour.

PHP 8.6 came out on 19 November 2026, and [Brewless built for it two days later](/blog/php-8-6-on-brewless). Those two days were handwork: a new entry in the build matrix, a new minimum in the Dockerfile, two extensions that needed attention, new digests in the configuration and a release of Brewless itself before anyone could name the version in `brewless.yml`.

The next version will not need that. This post shows how a new PHP version now becomes available on Brewless by itself, and what is deliberately left to you.

## When does a new PHP version become available on Brewless?

As soon as FrankenPHP publishes an image for it and our base images build on it. The same hourly workflow that [rolls out security patches without a rebuild](/blog/security-updates-without-a-rebuild) also looks one version ahead: after 8.6 it asks Docker Hub whether `dunglas/frankenphp` has a stable `1-php8.7` release, and the same for `9.0`. Alphas, betas and release candidates do not count.

When it finds one, it:

1. adds the version to `php-versions`, the one list the build matrix and the scripts read;
2. gives it a minimum in the Dockerfile, so a build on an older release of it is refused;
3. builds and publishes `brewless-base` and `brewless-builder` for it;
4. tells Brewless through the signed webhook.

## What does Brewless do with it?

It does not take the webhook's word for it. Brewless lists the tags of its own base image at ghcr.io, finds `php8.7`, and reads the digest and the PHP release from the image itself, the same way it reads every patch.

From that moment:

| | |
| --- | --- |
| `brewless.yml` | accepts `php: "8.7"` |
| The CLI and `brewless plan` | name 8.7 among the versions |
| A deploy | builds on the new base image, pulled by its digest |
| The admin panel | shows the version, since when it is there and how many environments run it |
| Owners and administrators | get one mail that it can be used |

No release of Brewless itself is needed. The list of versions is no longer only in the code: it is the versions of the configuration plus every version a base image was published for.

## Why does nothing move by itself?

Because a patch and a new version are different things. A patch, from 8.6.0 to 8.6.1, fixes bugs and security issues and changes no behaviour your code relies on, so Brewless puts it under your live release by itself. A new version deprecates things, changes others and needs your packages to allow it. That is a step you take on purpose:

```yaml brewless.yml
php: "8.7"
```

Then deploy, staging first. Before you do, `composer why-not php 8.7.0` lists every package that refuses the version.

The version an application gets when its `brewless.yml` names none stays `8.4`. A new PHP version never changes what an existing application runs.

## What if a new version does not build?

Then nothing is published for it, and Brewless does not offer it. Adding PHP 8.6 showed why that matters: the released redis extension did not compile on it, and PHP's own image no longer had mbstring built in. A build that fails stops before anything reaches the registry.

The workflow tries again every hour. Once the build works, because an extension released a version that compiles, or because we fixed the Dockerfile, the version appears.

## What stays yours?

Choosing the moment, and your own code. Brewless makes sure the version is there, built on a known release of FrankenPHP, with the same extensions as every other version, and patched from then on. Whether your application is ready for it is something only your tests can say.

The details are in the documentation on [security updates and new PHP versions](https://docs.brewless.eu/deployments/security-updates#new-php-versions).

## Frequently asked questions

### When can I use a new PHP version on Brewless?

As soon as FrankenPHP publishes an image for it and Brewless's base images build on it. The hourly workflow in brewless/images looks for it, builds the images and tells Brewless, which accepts the version in brewless.yml from then on. No release of Brewless itself is needed.

### Does my application move to the new PHP version by itself?

No. Your environments stay on the version they run until you set another one in brewless.yml and deploy. Patch releases within your version, which carry the security fixes, do arrive by themselves.

### How do I hear that a new PHP version is available?

The owners and administrators of every organisation with a live application get one mail, of the kind tips, with the version, the release it is built on and how to switch. A member who switched tips off gets none.

### What happens if a new PHP version does not build?

Then nothing is published for it and Brewless does not offer it. The workflow tries again every hour, so the version appears once the build works, for example after an extension released a version that compiles on it.

Source: https://test.brewless.eu/blog/new-php-versions-by-themselves
