You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compile PHP CLI and shared ZTS libphp from the same php.net release tarball. Verify SHA-256 and the official release signature.
Compile the released FrankenPHP/Caddy server from its exact Git commit using that libphp. Keep the existing Caddy modules, entrypoint, PHP extension tools, port binding, and Debian/variant/platform tags.
Resolve source releases once per CI run using Bash, curl and jq; no Python dependency. The daily production planner compares published source-version labels, so new PHP and FrankenPHP releases no longer wait on upstream Docker images.
Check exact resolved versions, ZTS and extensions in both the PHP CLI and a live FrankenPHP HTTP request.
Debian, Go, Node and Composer images remain dependencies; PHP/FrankenPHP upstream images do not. Full matrix builds and smoke tests are gated by the pull request workflow. No changes to image publication authorization.
Verification
bash .github/scripts/test-source-build.sh: ten resolver/planner regression scenarios passed.
Verified the PHP runtime package parser ignores Trixie usrmerge diversion records.
Live release resolution and Buildx Bake override render: eight targets, two platforms each; PHP 8.4.27/8.5.12 and FrankenPHP v1.13.5.
Verified the exact FrankenPHP commit fetch, per-platform published image config lookup, shell/PHP syntax and git diff --check.
Full container builds and runtime smoke tests require GitHub Actions; no Docker daemon on the local executor.
Summary by CodeRabbit
New Features
Added a local development build option.
Production images now include PHP and FrankenPHP built from stable source releases.
Improvements
Scheduled refreshes now account for PHP and FrankenPHP source updates and Debian package upgrades.
Image checks now verify PHP and FrankenPHP versions and runtime behavior.
Documentation
Updated build instructions and supported release details.
No actionable comments were generated in the recent review.
Walkthrough
The pull request replaces the inherited FrankenPHP image with a multi-stage build of PHP and FrankenPHP from source. It adds release resolution, integrates resolved versions into CI and scheduled build planning, and adds runtime checks for the built image.
The resolver validates PHP release versions and checksums, and resolves a stable FrankenPHP release to a commit. Bake targets and local build instructions use the resolved source values.
Build and assemble the source runtime docker/build-php.sh, docker/build-frankenphp.sh, docker/php-helpers/*, Dockerfile, docker/docker-php-entrypoint
The build compiles PHP and FrankenPHP from source and stages their runtime artifacts. The Dockerfile assembles the runtime image and uses the added PHP extension helpers.
Wire source builds into CI and scheduled planning .github/workflows/pipeline.yml, .github/scripts/plan-scheduled-build.sh, .github/scripts/test-source-build.sh, README.md
CI resolves source versions, shares them with build jobs, and checks scheduled rebuilds against image source-version labels. Offline tests cover source resolution, label comparisons, and package-update results.
Validate built image versions and runtime behavior .github/workflows/pipeline.yml, test.php
The image test receives expected PHP and FrankenPHP versions from matrix metadata. Runtime checks validate those versions, PHP thread safety, HTTP-served runtime details, and environment-specific extensions.
sequenceDiagram
participant Pipeline as CI pipeline
participant Resolver as resolve-sources.sh
participant Bake as Docker Bake
participant Image as Built image
participant Tests as Image tests
Pipeline->>Resolver: Resolve source versions from Bake metadata
Resolver-->>Pipeline: Return source-version override
Pipeline->>Bake: Build with Bake configuration and override
Bake-->>Image: Produce image
Pipeline->>Tests: Pass expected PHP and FrankenPHP versions
Tests->>Image: Check versions and runtime behavior
Loading
Suggested reviewers:clovis-mo
Merge Risk: Minimal · up to 65822
This change builds PHP and FrankenPHP from verified source releases instead of inheriting the upstream image, and it updates CI planning to match. No concrete defect was found in review. Container build and runtime checks run in the pull request workflow, so merge once those pass.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "Build PHP and FrankenPHP from source" matches the main change: the PR replaces upstream FrankenPHP-based images with source builds of PHP (CLI and shared ZTS libphp) and FrankenPHP. The cha…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "Build PHP and FrankenPHP from source" matches the main change: the PR replaces upstream FrankenPHP-based images with source builds of PHP (CLI and shared ZTS libphp) and FrankenPHP. The changeset covers the Dockerfile, build scripts (build-php.sh, build-frankenphp.sh), source resolution, and planner updates, all of which support this title. The title is concise, specific, and clear for a teammate scanning history.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: QUIET
Plan: Advanced
Run ID: 50b40348-988c-40f2-8bc3-81eb6c31a900
Commits
Reviewing files that changed from the base of the PR and between 0cc1e18 and 658221d.
Files selected for processing: 19
.github/scripts/plan-scheduled-build.sh
.github/scripts/test-source-build.sh
.github/workflows/pipeline.yml
AGENTS.md
Dockerfile
README.md
docker-bake.hcl
docker/build-frankenphp.sh
docker/build-local.sh
docker/build-php.sh
docker/docker-php-entrypoint
docker/php-helpers/LICENSE
docker/php-helpers/README.md
docker/php-helpers/docker-php-ext-configure
docker/php-helpers/docker-php-ext-enable
docker/php-helpers/docker-php-ext-install
docker/php-helpers/docker-php-source
docker/resolve-sources.sh
test.php
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Debian, Go, Node and Composer images remain dependencies; PHP/FrankenPHP upstream images do not. Full matrix builds and smoke tests are gated by the pull request workflow. No changes to image publication authorization.
Verification
bash .github/scripts/test-source-build.sh: ten resolver/planner regression scenarios passed.git diff --check.Summary by CodeRabbit