Skip to content

[TASK] Replace PECL installs with PIE and upstream source builds - #584

Merged
Kanti merged 2 commits into
webdevops:masterfrom
andersundsehr:build/replace-pecl-with-pie
Oct 21, 2026
Merged

Kanti merged 2 commits into
webdevops:masterfrom
andersundsehr:build/replace-pecl-with-pie

Conversation

@Kanti

@Kanti Kanti commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

PECL outages prevent rebuilding the PHP images. This PR replaces PECL installations with PIE or direct official upstream source builds while preserving existing extension pins, loading configuration, and PHP 8.2–8.5 Debian/Alpine support.

Installation

  • Mount the official ghcr.io/php/pie:bin build tool directly in the Dockerfile templates. APCu, Excimer, OpenTelemetry, Memcached, YAML, Redis, MongoDB, and Xdebug remain unpinned PIE requests.
  • Preserve XML-RPC 1.0.0RC3 everywhere. PHP 8.1 and its Protobuf-specific pin were removed upstream in Drop PHP 8.1 image builds and support #587; this PR is rebased onto that change.
  • PHP 8.2–8.5 Protobuf remains unpinned and uses the latest official upstream release. If upstream raises its minimum PHP version, older image builds can fail. This limitation is documented rather than adding another release selector or new fixed versions.
  • Retain native Vips for existing applications. Its upstream repository is deprecated and no longer maintained. The default branch contains 1.0.13; the newest GitHub tag is only v1.0.10, so choosing that tag would downgrade the extension. The branch may include changes beyond the PECL release.
  • Use straightforward shell source builds with parallel compilation. Keep one shared extension block for Debian and Alpine; inline PIE mounts and Xdebug commands. No custom PHP installer, release-selector tests, or extension API smoke suite remains.

ionCube ARM64 fix

The previous script installed the x86-64 loader archive on ARM64. The file existed but PHP could not load it, which the strict Serverspec stderr checks correctly detected.

Select the official archive using uname -m (x86_64 or aarch64), verify that it contains the target PHP loader, and load-test the copied module with PHP before writing its INI. An existing loader that cannot load fails the build. Unsupported architectures or missing PHP-version loaders are skipped without an invalid INI; Alpine retains its existing skip.

Behavior and tests

Existing extension loading, INI configuration, debugger switching, and module availability tests remain in place. Both strict stderr == '' assertions are retained. Existing Serverspec and container structure tests still run through the unchanged CI architecture on AMD64 and ARM64.

Local validation covers shell syntax, matching generated files, preserved pins, removal of obsolete references, and a real AMD64 ionCube loader in CLI/FPM with empty stderr. Missing-version, unsupported-architecture, Alpine-skip, and invalid-loader cases were checked locally. Only focused samples were run locally; native ARM64 and the full PHP image matrix are checked in GitHub Actions.

The previous-head CI run, #39604752036 on 2802bc25, completed with 114/120 PHP jobs passing. All six failures were Debian PHP 8.1 development builds, which are removed by upstream #587. All 96 remaining PHP 8.2–8.5 builds and Serverspec jobs passed, along with all 48 configured structure-test steps. Native Debian ARM64 ionCube loading was verified for every supported PHP version.

The local rebase onto 75d3f2e0 has regenerated, consistent files and no PHP 8.1 workaround. It has not been pushed or tested by a new CI run, so the previous results are not a CI pass for the rebased commit.

Review guide

The first commit contains source templates, ionCube provisioning, test cleanup, and documentation. The second contains regenerated Dockerfiles and provisioning copies. The CI builder and generated workflow match master.

@Kanti
Kanti force-pushed the build/replace-pecl-with-pie branch 2 times, most recently from 0507e94 to ffe24cb Compare October 21, 2026 10:47
Comment thread docker/php-official/8.1-alpine/Dockerfile Fixed
Comment thread docker/php-official/8.1/Dockerfile Fixed
Comment thread docker/php-official/8.2-alpine/Dockerfile Fixed
Comment thread docker/php-official/8.2-alpine/Dockerfile Fixed
Comment thread docker/php-official/8.2/Dockerfile Fixed
Comment thread docker/php-official/8.4/Dockerfile Fixed
Comment thread docker/php-official/8.5-alpine/Dockerfile Fixed
Comment thread docker/php-official/8.5-alpine/Dockerfile Fixed
Comment thread docker/php-official/8.5/Dockerfile Fixed
Comment thread docker/php-official/8.5/Dockerfile Fixed
@Kanti
Kanti force-pushed the build/replace-pecl-with-pie branch 2 times, most recently from 9865eab to 2802bc2 Compare October 21, 2026 13:04
@Kanti
Kanti force-pushed the build/replace-pecl-with-pie branch from 2802bc2 to 070de7a Compare October 21, 2026 14:16
@sonarqubecloud

Copy link
Copy Markdown

@Kanti
Kanti marked this pull request as ready for review October 21, 2026 15:09
@Kanti
Kanti merged commit 2fe6a87 into webdevops:master Oct 21, 2026
363 of 364 checks passed
@Kanti
Kanti deleted the build/replace-pecl-with-pie branch October 21, 2026 15:21
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.

2 participants