Skip to content

Scrape PHP versions, default PHP, and suites instead of hardcoding them - #1032

Open
tianon wants to merge 1 commit into
docker-library:masterfrom
infosiftr:defaults
Open

tianon wants to merge 1 commit into
docker-library:masterfrom
infosiftr:defaults

Conversation

@tianon

@tianon tianon commented Nov 21, 2026

Copy link
Copy Markdown
Member

Fixes #959

Replace the hardcoded phpVersions list and php8.3 default with data scraped in versions.sh, now that the "beta support" label for PHP versions is retired. PHP versions, suites, and architectures come from the upstream php image via bashbrew cat (tags are parsed up front instead of directories, pre-releases are only kept for versions that are not yet GA, and the lower bound is WordPress's own minimum), and the default PHP (phpDefault) is the newest version the WordPress PHP compatibility handbook documents as supported for that release.

Pin each FROM to its exact suite and add -trixie / -alpine3.24 tags (cli only gets alpine3.24). Move the library generation into generate-stackbrew-library.jq with a single GitCommit, so the generator no longer needs per-directory commits or bashbrew.

Write versions.json without sorting so keys keep the order we insert them in -- releases as latest, beta, cli, and each release as version, sha1 or sha512, phpDefault, php -- with php as an object keyed by PHP version (newest first, pre-releases last) so the update pipeline's commit messages never mistake PHP entries for version components. Drop upstream in favor of version holding WordPress's own release string, and generate the X.Y.0 form for tags in jq instead (there is no X.Y.0 tarball).

Assisted-By: "claude my eyes right out"

Replace the hardcoded `phpVersions` list and `php8.3` default with data scraped in `versions.sh`, now that the "beta support" label for PHP versions is retired.  PHP versions, suites, and architectures come from the upstream `php` image via `bashbrew cat` (tags are parsed up front instead of directories, pre-releases are only kept for versions that are not yet GA, and the lower bound is WordPress's own minimum), and the default PHP (`phpDefault`) is the newest version the WordPress PHP compatibility handbook documents as supported for that release.

Pin each `FROM` to its exact suite and add `-trixie` / `-alpine3.24` tags (`cli` only gets `alpine3.24`).  Move the library generation into `generate-stackbrew-library.jq` with a single `GitCommit`, so the generator no longer needs per-directory commits or `bashbrew`.

Write `versions.json` without sorting so keys keep the order we insert them in -- releases as `latest`, `beta`, `cli`, and each release as `version`, `sha1` or `sha512`, `phpDefault`, `php` -- with `php` as an object keyed by PHP version (newest first, pre-releases last) so the update pipeline's commit messages never mistake PHP entries for version components.  Drop `upstream` in favor of `version` holding WordPress's own release string, and generate the `X.Y.0` form for tags in jq instead (there is no `X.Y.0` tarball).

Assisted-By: "claude my eyes right out"
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.

More aggressive default php updates?

2 participants