feat: add PHP 8.5 support and refresh docs#36
Conversation
PHP 8.5.0 was released 2025-11-20. Add it alongside 8.2/8.3/8.4 in the push, PR fast-path (newest+oldest = 8.5+8.2), and publish matrices, including the v2 trixie includes. README tags table updated.
Captures project overview, build commands, CI workflow, v1-vs-v2 architecture, s6-overlay notes, and platform gotchas. Note that the single primary workflow (docker-ci.yml) handles push/PR/schedule and workflow_dispatch — there are no separate manual v1/v2 workflows.
The build-and-test and publish matrix snippets in docs/ci.md drifted to show deprecated versions (8.1, 7) and a wrong base set. Align with the real docker-ci.yml matrix: PHP 8.2-8.5, fpm/cli/apache, v1 on alpine/bookworm, v2 on alpine/trixie, plus the PR fast-path note.
Switch the "current version" example tag in README, docs, and the extras/ scripts from 8.3 to 8.5 so examples stay aligned with the newest actively-built version. The 8.3 row in the README tags table is preserved as a real supported version. Also broaden deprecation/ migration prose from "PHP 8.2 or 8.3" to "8.2-8.5" or "newer" so it won't go stale on every PHP release.
Upstream PHP security support for 8.2 ends 2026-12-31, after which a base image vulnerability would have no patch path. Document the removal date now (~7 months ahead) so anyone pinned to 8.2-* tags has time to migrate. Also adds a forward-looking deprecation schedule table covering 8.2 through 8.5 so future EOL handling follows the same documented policy (remove from matrix when upstream security support ends; existing tags stay pullable).
There was a problem hiding this comment.
Pull request overview
Adds PHP 8.5 to the CI build/publish matrix and updates repository documentation/examples to reference the newest actively-built tags, while also documenting a PHP version deprecation policy/schedule.
Changes:
- Extend GitHub Actions CI (PR fast-path + full matrix + publish) to include PHP 8.5.
- Refresh docs/examples to use
8.5-*tags and add a deprecation schedule/policy note (incl. PHP 8.2 removal after 2026-12-31). - Add
CLAUDE.mdrepo guidance for AI assistants and update CI documentation snippets to match the workflow.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/docker-ci.yml |
Adds PHP 8.5 to PR fast-path + full build/publish matrices (incl. v2/trixie includes). |
README.md |
Updates example tags to 8.5 and adds a deprecation schedule section/policy note. |
extras/test-build.sh |
Updates usage/docs examples; script logic still needs to correctly parse apache tags. |
extras/php_test.php |
Refreshes run examples to use 8.5 tags. |
docs/ci.md |
Updates CI matrix examples; some workflow behavior descriptions still diverge from actual triggers/fail-fast config. |
docs/deprecated-images.md |
Updates migration guidance wording and adds upcoming deprecation schedule table. |
docs/local-build.md |
Updates local build examples to 8.5; script path references appear incorrect. |
docs/migration.md |
Updates example tags to 8.5; includes a bullseye-v2 alias claim that doesn’t match current CI publishing behavior. |
docs/troubleshooting.md |
Refreshes example tags to 8.5. |
CLAUDE.md |
Adds project/CI guidance; several statements/examples are out of sync with current repo behavior and this PR’s doc refresh. |
Comments suppressed due to low confidence (3)
extras/test-build.sh:36
parse_tag()only recognizesfpmorclifor the image type. Passing an*-apache-*tag (e.g., from docs/local-build.md) will be parsed as empty and default tofpm, causing the script to build the wrong image type. Update the type extraction regex/default to includeapacheso the tag is interpreted correctly.
# Extract PHP version (e.g., 8.5, 8.2, 7)
local php_version=$(echo "$tag" | grep -oE '^[0-9]+(\.[0-9]+)?' || echo "")
# Extract variant (fpm or cli)
local variant=$(echo "$tag" | grep -oE '(fpm|cli)' || echo "fpm")
# Extract base OS (alpine, trixie, bookworm, bullseye)
local baseos=$(echo "$tag" | grep -oE '(alpine|trixie|bookworm|bullseye)' || echo "alpine")
docs/local-build.md:65
- This examples block still uses
./test-build.shinstead of./extras/test-build.sh, so the copy/paste commands won’t work in a clean checkout. Also, thev2 8.5-apache-bookwormexample is potentially confusing given CI/published v2 Debian images are trixie-based; consider switching the example to*-trixie(or explicitly explaining that local v2 builds may usebookworm).
```bash
# Build different PHP versions
./test-build.sh v2 8.1-cli-alpine
./test-build.sh v2 8.2-fpm-bookworm
./test-build.sh v2 8.5-apache-bookworm
# Build both v1 and v2
./test-build.sh both 8.5-cli-alpine
**docs/local-build.md:270**
* This section again references `./test-build.sh`, but the script lives under `extras/test-build.sh`. Please update this command (and any remaining occurrences) so the documented development workflow matches the repo layout.
- Make changes to Dockerfile.v1 or Dockerfile.v2
- Build locally using
test-build.sh - Run smoke tests to verify functionality
- Test your application with the new image
- Commit changes and push to GitHub
- CI pipeline will run automated tests
Testing Changes
# Build both variants
./test-build.sh both 8.5-fpm-alpine
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash | ||
| # Build v1 variant | ||
| ./test-build.sh v1 8.3-fpm-alpine | ||
| ./test-build.sh v1 8.5-fpm-alpine | ||
|
|
||
| # Build v2 variant | ||
| ./test-build.sh v2 8.3-fpm-alpine | ||
| ./test-build.sh v2 8.5-fpm-alpine | ||
|
|
||
| # Build both variants | ||
| ./test-build.sh both 8.3-fpm-alpine | ||
| ./test-build.sh both 8.5-fpm-alpine | ||
| ``` |
| ```bash | ||
| # These all reference the SAME trixie-built image: | ||
| kingpin/php-docker:8.3-fpm-trixie-v2 # Explicit trixie tag | ||
| kingpin/php-docker:8.3-fpm-bookworm-v2 # Backward-compatible alias | ||
| kingpin/php-docker:8.3-fpm-bullseye-v2 # Legacy compatibility alias | ||
| kingpin/php-docker:8.5-fpm-trixie-v2 # Explicit trixie tag | ||
| kingpin/php-docker:8.5-fpm-bookworm-v2 # Backward-compatible alias | ||
| kingpin/php-docker:8.5-fpm-bullseye-v2 # Legacy compatibility alias | ||
| ``` |
|
|
||
| ## Project Overview | ||
|
|
||
| Multi-architecture PHP Docker image builder. Two parallel Dockerfile variants (v1 and v2) produce images for PHP 8.2, 8.3, 8.4, 8.5 across alpine/bookworm (v1) and alpine/trixie (v2), with fpm and cli types. Published to Docker Hub, GHCR, and Quay.io. |
| ./extras/test-build.sh v1 8.3-fpm-alpine | ||
| ./extras/test-build.sh v2 8.3-fpm-alpine # tags as php-docker:8.3-fpm-alpine-v2 | ||
| ./extras/test-build.sh both 8.3-fpm-alpine # builds both variants | ||
|
|
||
| # v2 requires BuildKit (test-build.sh sets DOCKER_BUILDKIT=1 automatically) | ||
|
|
||
| # Smoke test installed extensions | ||
| docker run --rm php-docker:8.3-fpm-alpine php /extras/php_test.php |
|
|
||
| **v1 (Dockerfile.v1)**: Simple single-stage build. No init system. Base images from ECR (`public.ecr.aws/docker/library/php`). Suited for single-process containers. | ||
|
|
||
| **v2 (Dockerfile.v2)**: s6-overlay v3.2.1.0 for process supervision. OCI labels. Handles Debian Trixie t64 library transitions. BuildKit required. Production multi-process workloads. |
| Runs on every push to `main`, pull request, weekly schedule, and `workflow_dispatch`: | ||
|
|
||
| ```yaml | ||
| matrix: | ||
| variant: [v1, v2] | ||
| php-version: ['8.3', '8.1'] | ||
| php-type: [fpm, cli] | ||
| php-base: [alpine, bookworm] | ||
| php-version: ['8.5', '8.4', '8.3', '8.2'] # PR fast-path: ['8.5', '8.2'] | ||
| php-type: [fpm, cli, apache] | ||
| php-base: [alpine, bookworm] # v2 uses trixie instead of bookworm | ||
| # apache+alpine excluded; v2/trixie added via include | ||
| ``` |
| #### 1. build-and-test | ||
|
|
||
| Runs on every push and pull request: | ||
| Runs on every push to `main`, pull request, weekly schedule, and `workflow_dispatch`: | ||
|
|
parse_tag matched only fpm|cli, so any apache tag (documented in the script's own usage examples and used in CI for *-apache-bookworm combos) silently fell back to the default fpm. Add apache to the regex so the script builds the requested image type.
…1 example The helper script lives at extras/test-build.sh, not at the repo root, so the documented commands fail when copy-pasted from a clean checkout. Replace ./test-build.sh references with ./extras/test-build.sh throughout. Also swap the 8.1-cli-alpine example for 8.5-cli-alpine (8.1 is deprecated and not built by the matrix) and add a one-line note clarifying that a v2 bookworm tag resolves to a trixie-built image via the bookworm-v2 compatibility alias.
CLAUDE.md: - Include apache in the type list (apache is built on Debian bases). - Bump example tags from 8.3 to 8.5 to match the rest of the docs. - Replace the broken smoke-test command (/extras/php_test.php is not baked into the image) with the bind-mount form used in the script's own docstring. - Stop hard-coding "s6-overlay v3.2.1.0"; CI resolves the latest release at build time, v3.2.1.0 is just the Dockerfile ARG default. docs/migration.md: - Drop the bullseye-v2 alias example. The publish job only creates bookworm-v2 aliases for v2/trixie builds; bullseye-v2 tags are not published. Add a note pointing bullseye users to bookworm-v2. docs/ci.md: - Correct "Fails fast if any variant fails" — the matrix runs with fail-fast: false so all combinations run to completion. - Correct the Branch Testing section: the push trigger is restricted to main, so non-main work runs via pull_request or workflow_dispatch, not via push events.
|
Addressed the Copilot review in 3 follow-up commits: 56483d5
738d250
01f34c5
Thanks @copilot-pull-request-reviewer for catching all of these — most predated this PR but are now correct. |
…nt CI Agent-Logs-Url: https://github.com/KingPin/php-docker/sessions/b37e91db-3114-4f2c-87f6-23029b6c2797 Co-authored-by: KingPin <28669+KingPin@users.noreply.github.com>
The Documentation CI was still failing with 51 MD060/table-column-style markdownlint errors across 4 files. Fixed in commit
|
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Summary
docker-ci.yml).8.3-...to8.5-...so docs track the newest actively-built version.docs/ci.mdto match the real workflow.CLAUDE.mdproject guide for AI assistants working in this repo.Commits
feat: add PHP 8.5 to build matrix— full matrix + PR fast-path + publish + v2 trixie includes.docs: add CLAUDE.md project guide for AI assistants— first commit ofCLAUDE.md.docs(ci): correct example matrices to match actual workflow—docs/ci.mdsnippets aligned withdocker-ci.yml.docs: bump example tags to PHP 8.5 and refresh supported-version prose— README, docs/, extras/ (8.3 row in tags table preserved as a real supported version).docs: announce PHP 8.2 deprecation after 2026-12-31— schedule table + policy note inREADME,docs/deprecated-images.md,CLAUDE.md.Test plan
public.ecr.aws/docker/library/php:8.5-*base images are pullable andinstall-php-extensionshandles 8.5 (validated by the CI build itself; no local build was run before this PR).docs-ci.yml) passes on the changed docs.Notes for reviewer
8.3row in the README tags table is intentionally preserved — only example tags were bumped, not the supported-version table.Dockerfile.v1/Dockerfile.v2still defaultARG VERSION=8.3-cli-alpine. Deliberately not touched here because it's a behaviour change fordocker build .without--build-arg. Can be a follow-up if desired.