Under the hood
PHP 8.6 on Brewless: what it took to add it
PHP 8.6 came out on 19 November 2026 and Brewless builds for it since the 21st. What broke on the way, who gets it by default, and how to check your own app.
In this post
- Can I run PHP 8.6 on Brewless today?
- From PHP's release to an image you can deploy
- What broke on PHP 8.6
- Why your application does not move by itself
- How brewless init picks the version
- Brewless itself runs 8.5, and why
- How to move an application to PHP 8.6
- What PHP 8.6 brings
- Until when is each version supported?
PHP 8.6.0 was released on 19 November 2026. Two days later a Laravel application on Brewless can be built for it. The two days were not spent waiting for a version number: a new PHP version breaks things underneath, and those have to be found before your application meets them.
This is what happened between the release and the first build, who gets 8.6 by default and who does not, and how you check whether your own application is ready.
Can I run PHP 8.6 on Brewless today?
Yes. Name the version in brewless.yml and deploy; the release is built and run on PHP 8.6.0. A new application gets that line from brewless init. An application that exists already stays on the version it has until you change the line yourself.
organisation: acme
application: shop
framework: laravel
php: "8.6"
Brewless builds for 8.3, 8.4, 8.5 and 8.6. The deployments page says what the line does.
From PHP's release to an image you can deploy
A PHP release reaches a container through a chain of images. Brewless runs FrankenPHP, so its images are built on FrankenPHP's, which are built on PHP's own. Each link has to exist before the next one can be built.
| When (Amsterdam time) | What |
|---|---|
| 19 November | PHP 8.6.0 is released |
| 19 November, 20:06 | PHP's own image for 8.6.0 is on Docker Hub |
| 21 November, 05:11 | FrankenPHP's first images for PHP 8.6 are on Docker Hub |
| 21 November, 09:48 | FrankenPHP 1.14.0 follows; its image for PHP 8.6 is the one Brewless builds on |
| 21 November, 20:30 | Brewless's base and builder image for PHP 8.6 are published |
The last step is the one we own, and it took most of an evening instead of the three minutes a patch release takes. The reason is the next section.
What broke on PHP 8.6
The first attempt was the obvious one: add 8.6 to the list of versions the images are built for. Both 8.6 builds failed.
The redis extension did not compile. PHP 8.6 removed an old macro that phpredis 6.3.0, the released version, still uses. phpredis fixed it in its development branch in June 2026 and tests that branch on PHP 8.6, but has not released it. So the 8.6 image builds phpredis from one named commit of that branch, with the options the release is built with. The images for 8.3, 8.4 and 8.5 keep the released extension. When phpredis releases a version that compiles on 8.6, the 8.6 image moves to it.
mbstring was gone. PHP's own image for 8.6 no longer has mbstring compiled in; the one for 8.5 has. The image built without it, and nothing complained until we compared the extensions of the 8.6 image with those of the 8.5 image, one by one. Laravel requires mbstring, and composer install refuses to go on without it. The Dockerfile now installs it and refuses an image without it.
Neither of these shows in a version number. The first stopped the image from being built at all. The second would have stopped the build of every application on 8.6, at composer install, with an image that looked fine. The image for 8.6 now has exactly the extensions the other three have, and its build checks for the two that went missing.
Note
The images are public, with their Dockerfile: github.com/brewless/images. The commit of phpredis the 8.6 image is built from is named there.
Before the images were published, the tests of brewless/laravel, of the command line client and of Brewless itself ran inside the new 8.6 builder image. All three passed.
Why your application does not move by itself
There are two settings where a platform usually has one.
| PHP version | |
|---|---|
A new application, made with brewless init |
8.6 |
An application whose brewless.yml names no version |
8.4, as before |
An application whose brewless.yml names a version |
That version |
A new PHP version is a reason to start new work on it. It is no reason to move an application that runs. If the version for "no version named" moved to 8.6, every such application would be built for another PHP version at its next deploy, on a day somebody only meant to fix a typo. So that version stays where it is, and brewless init writes the version in the file of a new application instead. What is written down does not move.
How brewless init picks the version
brewless init (from version 1.5.0 of the client) does not write 8.6 blindly. It reads the php requirement of your composer.json, and of every package in your composer.lock that a build installs, and takes the newest version Brewless builds that all of them allow:
$ brewless init
Framework: laravel (from composer.json; overrule with --framework=)
PHP: 8.5 (the newest your project takes: acme/driver asks for >=8.2 <8.6, so not 8.6; overrule with --php=)
The build runs composer install on the PHP version of the release. One package that refuses that version stops the build, so it is better to hear it from init than from a failed deploy. Packages that only a developer installs are left out: the build does not install them.
Brewless itself runs 8.5, and why
Brewless is deployed through Brewless, so the same rule applies to it. Its test suite passes on PHP 8.6. Its composer.lock does not: the package it uses for money amounts allows PHP up to 8.5, and composer install on 8.6 refuses it. The makers of that package have a change open that adds 8.6.
We could tell Composer to ignore the requirement. We did not: the package is what invoices are calculated with, and its makers have not said it is ready. Brewless moved from 8.4 to 8.5 instead, and goes to 8.6 when the package does.
That is the situation many applications are in during the first weeks of a PHP version, and it is not a problem. PHP 8.4 gets security fixes until 31 December 2028 and 8.5 until 31 December 2029.
How to move an application to PHP 8.6
-
Ask Composer what stands in the way:
composer why-not php 8.6.0When it names no package, every package allows 8.6. Otherwise update the packages it names, or wait for them.
-
Set
php: "8.6"inbrewless.ymland deploy to a staging environment. The build resolves and installs your packages on 8.6, and a build that fails never goes live: the previous release keeps serving. -
Run your tests on 8.6 and read the deprecations. PHP 8.6 deprecates, among other things,
returninside afinallyblock, themb_eregfamily of functions,spl_object_hash()and aliases such asis_double()anddoubleval(). A deprecation is a warning, not an error, but it is the list of what a later version removes. -
Deploy to production. Going back is the same line with the old version.
Sessions are stricter by default in 8.6: session.use_strict_mode and session.cookie_httponly are on and session.cookie_samesite is Lax. Laravel sets its own session cookie, so for a Laravel application this changes nothing.
What PHP 8.6 brings
The release notes are on php.net. The ones a Laravel developer meets first:
- Partial function application.
str_replace('a', 'o', ?)gives a closure that takes the missing argument. clamp().clamp(15, 0, 10)is10.- A
Durationclass for elapsed time, such as a timeout. - A polling API that event loop libraries can build on.
- Readonly properties with a default value, and
#[\Override]on class constants.
Until when is each version supported?
From php.net:
| PHP | Bug fixes until | Security fixes until |
|---|---|---|
| 8.3 | ended | 31 December 2027 |
| 8.4 | 31 December 2026 | 31 December 2028 |
| 8.5 | 31 December 2027 | 31 December 2029 |
| 8.6 | 31 December 2028 | 31 December 2030 |
When a patch release of any of them comes out, the images are rebuilt on it; how that went on 19 November is another article.
Frequently asked questions
Can I run PHP 8.6 on Brewless?
Yes, since 21 November 2026. Name it in brewless.yml with php: "8.6" and deploy. The release is built and run on PHP 8.6.0 on FrankenPHP, with the same extensions as the images for 8.3, 8.4 and 8.5.
Does my existing application move to PHP 8.6 by itself?
No. An application whose brewless.yml names no version is built for 8.4, as before, and one that names a version keeps it. Only a new application, made with brewless init, starts on 8.6.
How do I know whether my Laravel application can run on PHP 8.6?
Run composer why-not php 8.6.0 in your project. It lists every package whose requirement refuses that version. When it names none, composer install will work on 8.6; your own code is then yours to test, on a staging environment first.
Why does Brewless itself not run PHP 8.6 yet?
Brewless uses a package for money amounts that allows PHP up to 8.5. Its makers have a change open that adds 8.6. Until that is released Brewless runs 8.5, and its full test suite already passes on 8.6.
Which redis extension is in the PHP 8.6 image?
The released phpredis 6.3.0 does not compile on PHP 8.6, so the 8.6 image builds phpredis from the commit of its development branch that phpredis itself tests on PHP 8.6. The images for 8.3, 8.4 and 8.5 keep the release. The Dockerfile is public and names the commit.