Skip to content

fix: support PHP 8.7 VM interrupts - #411

Draft
realFlowControl wants to merge 1 commit into
developfrom
florian/php-master-interrupt-compat
Draft

realFlowControl wants to merge 1 commit into
developfrom
florian/php-master-interrupt-compat

Conversation

@realFlowControl

@realFlowControl realFlowControl commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

PHP 8.7 master removed zend_atomic_bool and zend_atomic_bool_store() in favor of standard C atomics (php/php-src#23927), breaking the build.

  • Add a private interrupt type matching PHP's VM interrupt flag.
  • Route Runtime::kill() and Future::cancel() through one version-aware helper.
  • Use atomic_store() on PHP 8.7+, preserve Zend atomics on PHP 8.2–8.6 and the existing assignment on PHP 8.0–8.1, without redefining Zend symbols.

Testing

Local macOS ARM64 ZTS builds:

PHP Build Full test suite
8.3 Pass 146 passed, 2 skipped
8.4 Pass 148 passed
8.6 Pass 144 passed, 4 failed
8.7 master Pass 144 passed, 4 failed

All 10 selected kill/cancellation tests pass on PHP 8.7, both without and with OPcache. Clang-format 20 and git diff --check pass.

The same four failures reproduce on unmodified develop at c08caeb with PHP 8.6: tests/base/021.phpt, 051.phpt, and 063.phpt have deprecation-output mismatches; tests/closures/010.phpt fails closure binding and reports heap corruption on PHP 8.7. These are outside this build fix.

Existing compiler warnings are unchanged. PHP 8.0–8.2, PHP 8.5 ZTS, and Windows were not tested.

GitHub Actions validation is blocked: jobs are not starting because the repository owner's account is locked due to a billing issue.

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.

1 participant