Skip to content

feat(php): support PHP 8.6, use apt .sources for PHP ZTS repository - #76

Merged
stasadev merged 3 commits into
mainfrom
20261009_stasadev_php86
Oct 9, 2026
Merged

stasadev merged 3 commits into
mainfrom
20261009_stasadev_php86

Conversation

@stasadev

@stasadev stasadev commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Short Summary (TL;DR)

Adds PHP 8.6 support by adding the PHP ZTS repository as a deb822 .sources file instead of running install.sh, which rejects PHP 8.6 and writes a legacy .list file.

The Issue

DDEV HEAD supports PHP 8.6, but the add-on fails to build with it:

  • https://files.henderkes.com/install.sh only accepts 8.2-8.5, even though the PHP 8.6 repository already exists. It also writes a one-line .list file, while ddev/ddev-webserver uses deb822 .sources files for all its repositories.
  • php-zts-memcached and php-zts-redis don't exist in the PHP 8.6 repository yet, so apt-get install fails on them.
  • blackfire-php 2026.8.8 has no ZTS build for PHP 8.6: the newest one is blackfire-20250925-zts.so (PHP 8.5), there is no blackfire-20260924-zts.so.

How This PR Solves The Issue

  • pre.Dockerfile.frankenphp downloads the repository key for the project's PHP version and adds /etc/apt/sources.list.d/php-zts.sources, like the other repositories in ddev/ddev-webserver.
  • A new post-install action removes php-zts-memcached and php-zts-redis from .ddev/config.frankenphp.yaml for PHP 8.6, if the file still has #ddev-generated.

Manual Testing Instructions

Requires DDEV HEAD:

ddev utility download-ddev --head
export PATH="$HOME/tmp/ddev-download-ddev/main:$PATH"
ddev config --php-version 8.6
ddev add-on get ddev/ddev-frankenphp --pr 76
ddev restart

Automated Testing Overview

  • Adds the install from directory PHP 8.6 test with the php86 tag, and adds php86 to the bats_tag matrix.
  • The test is skipped on DDEV v1.25.4, which doesn't support PHP 8.6.
  • On PHP 8.6, health_checks skips memcached, redis, and blackfire, because of the issues above.
  • The existing tests for PHP 8.2-8.5 cover the new .sources setup.

Release/Deployment Notes

On PHP 8.6, blackfire is installed and disabled by default, so it only fails when enabled with ddev blackfire on.

The memcached/redis removal and the test exclusion have TODOs to remove them once the extensions work with PHP 8.6 upstream.

🤖 Generated with Claude Code

stasadev and others added 3 commits October 9, 2026 13:56
## Short Summary (TL;DR)

Adds PHP 8.6 tests, and adds the PHP ZTS repository as a deb822 `.sources` file instead of running `install.sh`, which writes a legacy `.list` file and rejects PHP 8.6.

## The Issue

DDEV HEAD supports PHP 8.6, and the add-on itself needs no changes for it, but:

- https://files.henderkes.com/install.sh only accepts 8.2-8.5, even though the PHP 8.6 repository already exists. It also writes a one-line `.list` file, while `ddev/ddev-webserver` uses deb822 `.sources` files for all its repositories.
- `php-zts-memcached` and `php-zts-redis` don't exist in the PHP 8.6 repository yet, so `apt-get install` fails on them.
- `php-zts-xdebug` 3.6.0~dev+php86~beta2 doesn't load on PHP 8.6.0RC3:
  ```
  Xdebug requires Zend Engine API version 420250926.
  The Zend Engine API version 420260924 which is installed, is newer.
  ```
- `blackfire-php` 2026.8.8 has no ZTS build for PHP 8.6: the newest one is `blackfire-20250925-zts.so` (PHP 8.5), there is no `blackfire-20260924-zts.so`.

## How This PR Solves The Issue

- `pre.Dockerfile.frankenphp` downloads the repository key for the project's PHP version and adds `/etc/apt/sources.list.d/php-zts.sources`, like the other repositories in `ddev/ddev-webserver`.
- A new post-install action removes `php-zts-memcached` and `php-zts-redis` from `.ddev/config.frankenphp.yaml` for PHP 8.6, if the file still has `#ddev-generated`.

## Manual Testing Instructions

Requires DDEV HEAD:

```bash
ddev utility download-ddev --head
export PATH="$HOME/tmp/ddev-download-ddev/main:$PATH"
ddev config --php-version 8.6
ddev add-on get ddev/ddev-frankenphp --pr 76
ddev restart
```

## Automated Testing Overview

- Adds the `install from directory PHP 8.6` test with the `php86` tag, and adds `php86` to the `bats_tag` matrix.
- The test is skipped on DDEV v1.25.4, which doesn't support PHP 8.6.
- On PHP 8.6, `health_checks` skips memcached, redis, xdebug, and blackfire, because of the issues above.
- The existing tests for PHP 8.2-8.5 cover the new `.sources` setup.

## Release/Deployment Notes

On PHP 8.6, xdebug and blackfire are still installed and disabled by default, so they only fail when enabled with `ddev xdebug on` or `ddev blackfire on`.

The memcached/redis removal and the test exclusions have TODOs to remove them once the extensions work with PHP 8.6 upstream.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stasadev

stasadev commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

Run the tests again after https://pkg.henderkes.com/86/-/packages/debian/php-zts-xdebug/ is fixed.

@stasadev stasadev changed the title test: add PHP 8.6 tests, use apt .sources for PHP ZTS repository feat(php): support PHP 8.6, use apt .sources for PHP ZTS repository Oct 9, 2026
@stasadev
stasadev marked this pull request as ready for review October 9, 2026 17:04
@stasadev
stasadev merged commit df59595 into main Oct 9, 2026
73 of 80 checks passed
@stasadev
stasadev deleted the 20261009_stasadev_php86 branch October 9, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant