Skip to content

ci: add PHP debug build job#33

Merged
ptondereau merged 2 commits into
mainfrom
ci/php-debug-build
May 13, 2026
Merged

ci: add PHP debug build job#33
ptondereau merged 2 commits into
mainfrom
ci/php-debug-build

Conversation

@ptondereau
Copy link
Copy Markdown
Owner

Adds a tests-debug job that runs PHPUnit against a PHP debug build. The debug build enables Zend's refcount invariants and the leak detector at shutdown, which catches FFI refcount mistakes that release builds silently let through.

Spotted while tracing the DatalogException::getMessage leak: the release matrix passed, the bug only surfaced because I happened to be on a local PHP 8.5-dev debug build. With this job we would have caught it in CI.

Runs on PHP 8.5 with continue-on-error: true for the initial rollout so unrelated bleeding-edge asserts do not block PRs. Flip to false once we trust the signal.

The debug PHP build runs Zend's refcount invariants and a leak detector
at shutdown. Release builds silently let those bugs through, as we just
saw with the #[php(prop)] String getter leak on Exception::getMessage.

continue-on-error is on during initial rollout so unrelated PHP-internal
asserts on bleeding-edge versions do not block PRs. Will flip to false
once we have a few clean runs.
Comment thread .github/workflows/tests.yml Fixed
…ntain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@ptondereau ptondereau marked this pull request as ready for review May 13, 2026 17:18
@ptondereau ptondereau merged commit ea66b62 into main May 13, 2026
9 checks passed
@ptondereau ptondereau deleted the ci/php-debug-build branch May 15, 2026 14:13
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