Add CI and support PHP 8.1 through 8.4#18
Closed
jdatcmd wants to merge 5 commits into
Closed
Conversation
A GitHub Actions matrix builds PL/php and jsonb_plphp and runs the full regression suite on PostgreSQL 11-18 (distro PHP 8.3) plus PHP 8.1, 8.2, and 8.4 (ondrej PPA) against the newest PostgreSQL, for every push to master and every pull request. PHP compatibility fixes found while widening the matrix: - PHP 8.1: php_module_startup still took an additional-modules count; add a version guard. Also #error explicitly below 8.1, where the zend_error_cb signature differs. - PHP 8.4: fgetcsv deprecates omitting $escape; the cookbook's CSV recipe now passes explicit arguments. - The Makefiles now prefer the libphp matching PHP_CONFIG's version when several are installed. Note (INSTALL): some packagings give every libphpX.Y.so the same SONAME (libphp.so), so the backend loads whatever that symlink points at regardless of the version linked -- keep one embed package installed, or point the symlink. The suite passes on PHP 8.1, 8.2, 8.3, and 8.4 (each with the matching runtime); documented range updated from "8.x" to 8.1-8.4. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Actions runner image sets create_main_cluster=false, so installing postgresql-N does not create one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pg_regress runs as postgres, which could not reach the checkout through /home/runner. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The host's php.ini must not decide which errors reach our zend_error_cb or how they are routed: hardcode error_reporting=E_ALL, display_errors/log_errors off, and disable opcache (whose JIT adds nothing for our one-shot eval'd functions). GitHub's runner images ship a PHP with opcache+JIT enabled for CLI, which silently dropped notices and reduced every error message to "fatal error". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Extensions loaded from the host's php.ini (xdebug, notably, which the GitHub runner images preconfigure) hook zend_error_cb during startup, swallowing the warnings and notices PL/php forwards to the client. Re-assert our callback after request startup and at the top of every handler invocation (a pointer assignment, effectively free), and set xdebug.mode=off alongside the other hardcoded INI values. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Stacked on #17; retarget to master when it merges.
CI
.github/workflows/ci.yml: a matrix that builds PL/php andjsonb_plphpand runs the full regression suite on every PR and push to master —with
regression.diffsdumped on failure. (This PR's own checks are the workflow's first live run.)PHP 8.1–8.4 compatibility
Widening the matrix surfaced real issues, all fixed and re-verified — the full suite passes on all four PHP versions:
php_module_startupstill took a third argument — version guard added; explicit#errorbelow 8.1 (differentzend_error_cbsignature).fgetcsvdeprecates omitting$escape— the cookbook CSV recipe passes explicit arguments now.libphpmatchingPHP_CONFIG's version. INSTALL documents the packaging trap we hit: sury gives everylibphpX.Y.sothe same SONAME (libphp.so), so the backend loads whatever that symlink points at regardless of what was linked — the cause of a very confusing segfault during testing.Documented supported range updated from "PHP 8.x" to 8.1–8.4. Core suite also re-swept green on PG 11–18.
🤖 Generated with Claude Code