Repository navigation
build(docker): install PHP extensions with PIE instead of pecl - #102
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe Docker build adds PIE 1.5.2 and uses it to install YAML and APCu with version constraints. It also adds ChangesPHP Extension Installation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The Dockerfile preserves the extension installation and transfer path into the final image. No actionable merge-blocking issue is established, though the reported final-image checks were not independently reproduced. Pre-merge checks |
|
PECL is deprecated in favour of PIE (PHP Installer for Extensions). It also failed silently: when the freshly published yaml 2.3.0 had no REST dependency metadata yet, `pecl install apcu yaml` skipped yaml without failing and the build only broke later, at `docker-php-ext-enable yaml`. PIE (pinned to 1.5.2 via its ghcr.io binary image) installs pecl/yaml and apcu/apcu from Packagist and enables them itself, so they are dropped from docker-php-ext-enable. unzip is added to the build stage because PIE needs it to extract sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e3d607b to
f87a0d1
Compare
Description
PECL is deprecated in favour of PIE (PHP Installer for Extensions). This switches the Docker build stage from
pecl installtopie install.It also fixes a real failure mode. When yaml 2.3.0 was freshly published, PECL had no REST dependency metadata for it yet (
Package "yaml" Version "2.3.0" does not have REST dependency information available).pecl install apcu yamlthen skipped yaml without failing, and the build only broke at the next command,docker-php-ext-enable yaml(error: 'yaml' does not exist). That is what broke the E2E image build on Liturgical-Calendar/LiturgicalCalendarFrontend#601. PIE fails at the install itself.Changes
COPY --from=ghcr.io/php/pie:1.5.2-bin /pie /usr/bin/piepie install pecl/yaml:^2.3andpie install apcu/apcu:^5.1replacepecl install apcu yamlconf.d/docker-php-ext-*.inifiles thatdocker-php-ext-enabledoes. They are therefore dropped fromdocker-php-ext-enable, and the final stage's existingCOPY --from=buildofextensions/andconf.d/carries them over unchanged.unzipis added to the build stage's apt packages. PIE fetches the extension source through Composer and fails without unzip or the zip extension.PIE downloads the source from GitHub (
api.github.comzipball, redirected tocodeload) without a token, which is the same host the Dockerfile'scomposer installalready uses. So no token plumbing is added.Type of change
How Has This Been Tested?
docker build.php -mlists the expected extensions andphpversion()reports yaml 2.3.0 and apcu 5.1.28.yaml_emit()runs.🤖 Generated with Claude Code
Summary by CodeRabbit