Use PiE on PHP 8.1 and newer - #186
Open
eiriksm wants to merge 7 commits into
Open
Conversation
PIE itself requires PHP 8.1+ to run, so it can now replace pecl for every extension that has a PIE-compatible Packagist package (ds, apcu, rdkafka, yaml, uuid, msgpack, decimal, amqp, mongodb, memcached, swoole, phpredis, igbinary, mailparse, imagick) on PHP 8.1-8.5, not just 8.6. Extensions with no PIE package (oauth, sqlsrv/pdo_sqlsrv, imap, opcache, xmlrpc) keep using pecl or the bundled PHP build. The BOX_REQUIREMENT_CHECKER/CFLAGS/libtool compat workaround stays scoped to PHP 8.6 only, since that's specific to building against the 8.6 alpha's Zend API changes and isn't needed on released versions.
igbinary/igbinary has no stable-tagged release pie can resolve (CI on PHP 8.3 failed with "Unable to find an installable package igbinary/igbinary ... with minimum stability stable"); switch to the PIE-compatible mirror pie-extensions/igbinary, which does have stable releases. Also install libtool unconditionally wherever pie is installed (8.1-8.6), not just as part of the 8.6 alpha workaround: pie was warning "missing build tools: libtoolize/glibtoolize" on every install, which builds happened to survive by luck but easily could not for other extensions.
pecl.php.net had a transient outage (504 Gateway Timeout on pecl channel-update), which only affects PHP 7.3/7.4/8.0 since 8.1+ now uses pie. With fail-fast: true, that one flaky job cancelled every other matrix entry, including the versions this PR actually changes. Set fail-fast: false on both the test and buildx matrices, and mark the 7.3/7.4/8.0 jobs continue-on-error so an upstream pecl.php.net hiccup doesn't block the whole workflow or the PR's required checks.
CI on 8.1 failed: "Package php-ds/ext-ds was not of type php-ext or php-ext-zend". php-ds/ext-ds's only PIE-typed releases (v1.8.0, v2.0.0) require PHP >= 8.2, so there is no PIE-installable ds for 8.1. Checked Packagist metadata for pie-extensions/igbinary too, which has the same >= 8.2 floor, so it would have failed identically further into the script. Both now stay on their original pecl path for 8.1 and only use pie starting at 8.2. Also split the downstream "already enabled by pie" step so 8.1 still explicitly enables ds (pecl-installed there) while yaml/decimal/uuid/ mailparse/msgpack/amqp (still pie-installed on 8.1) are left alone. Verified against Packagist's require.php for every other package this PR moved to pie (decimal, amqp, apcu, rdkafka, yaml, uuid, msgpack, mailparse, memcached, redis, imagick, mongodb, swoole) - all support PHP 8.1.
main picked up two unrelated changes since this branch was created: removing PHP 7.3 from the build matrix and install script (#189), and stripping build-only apk packages from the finished image via --virtual .build-deps groups with cleanup at the end (#180). Rather than resolve the textual conflicts in place, took main's php-install.sh as the base and replayed every pie conversion from this branch on top of it, adjusting version patterns for the removed 7.3 cases (mostly just dropping now-nonexistent 7.3-specific pecl branches). Also dropped the now-stale "7.3" entry from the continue-on-error version lists in test.yml/buildx.yml, matching the matrix.
These were added as a workaround for a transient pecl.php.net outage that was affecting unrelated jobs. Reverting to the original fail-fast behavior (default in test.yml, explicit true in buildx.yml) and dropping the continue-on-error override.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.