Skip to content

Add CI and support PHP 8.1 through 8.4#18

Closed
jdatcmd wants to merge 5 commits into
variadicfrom
php-compat-ci
Closed

Add CI and support PHP 8.1 through 8.4#18
jdatcmd wants to merge 5 commits into
variadicfrom
php-compat-ci

Conversation

@jdatcmd

@jdatcmd jdatcmd commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #17; retarget to master when it merges.

CI

.github/workflows/ci.yml: a matrix that builds PL/php and jsonb_plphp and runs the full regression suite on every PR and push to master —

  • PostgreSQL 11 → 18 × distro PHP 8.3
  • PostgreSQL 18 × PHP 8.1 / 8.2 / 8.4 (ondřej PPA)

with regression.diffs dumped 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:

  • 8.1: php_module_startup still took a third argument — version guard added; explicit #error below 8.1 (different zend_error_cb signature).
  • 8.4: fgetcsv deprecates omitting $escape — the cookbook CSV recipe passes explicit arguments now.
  • Multi-version installs: the Makefiles now prefer the libphp matching PHP_CONFIG's version. INSTALL documents the packaging trap we hit: sury gives every libphpX.Y.so the 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

ChronicallyJD and others added 3 commits July 5, 2026 18:09
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>
ChronicallyJD and others added 2 commits July 5, 2026 18:18
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>
@jdatcmd
jdatcmd deleted the branch variadic July 6, 2026 01:14
@jdatcmd jdatcmd closed this Jul 6, 2026
jdatcmd added a commit that referenced this pull request Jul 6, 2026
CI, PHP 8.1-8.4 support, and array columns in rows (relanded #18 + #19)
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