Skip to content

feat: support PHP 8.6 - #266

Draft
brettmc wants to merge 2 commits into
phper-framework:masterfrom
brettmc:php-8.6-support
Draft

brettmc wants to merge 2 commits into
phper-framework:masterfrom
brettmc:php-8.6-support

Conversation

@brettmc

@brettmc brettmc commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

phper did not compile against PHP 8.6. The release renames or reshapes several symbols that bindgen exposes, and the build failed with 21 errors in the phper crate.

ZEND_USER_FUNCTION, ZEND_EVAL_CODE and the ZEND_RESULT_CODE_* values became C23 enums, so bindgen now prefixes them with the enum name. They are aliased back in utils.rs, which leaves the call sites alone. zend_call_known_function became a static inline wrapper that bindgen cannot see, so 8.6 calls zend_call_known_function_ex directly. The zend_ini_* getters take a bool for "orig", handlers.offset is a size_t, and zend_function_entry.flags is a uint64_t.

The HASH_KEY_IS_* gate tested for exactly 8.5, so 8.6 took the older branch. It now means 8.5 and later, which also keeps 8.7 working.

Add an 8.6 row to the CI matrix. It is marked experimental, so a failure does not fail the run, until 8.6 reaches GA on 2026-11-19. Local runs pass on 7.0 to 8.6. ZTS and debug builds are untested.

Assisted-By: Claude Code

phper did not compile against PHP 8.6. The release renames or
reshapes several symbols that bindgen exposes, and the build failed
with 21 errors in the phper crate.

ZEND_USER_FUNCTION, ZEND_EVAL_CODE and the ZEND_RESULT_CODE_* values
became C23 enums, so bindgen now prefixes them with the enum name.
They are aliased back in utils.rs, which leaves the call sites alone.
zend_call_known_function became a static inline wrapper that bindgen
cannot see, so 8.6 calls zend_call_known_function_ex directly. The
zend_ini_* getters take a bool for "orig", handlers.offset is a
size_t, and zend_function_entry.flags is a uint64_t.

The HASH_KEY_IS_* gate tested for exactly 8.5, so 8.6 took the older
branch. It now means 8.5 and later, which also keeps 8.7 working.

Add an 8.6 row to the CI matrix. It is marked experimental, so a
failure does not fail the run, until 8.6 reaches GA on 2026-11-19.
Local runs pass on 7.0 to 8.6. ZTS and debug builds are untested.

Assisted-By: Claude Code
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