Skip to content

Update unstable PHP tag to 8.6.0beta1 - #194

Merged
eiriksm merged 10 commits into
mainfrom
claude/unstable-tag-alpha-3-3atr61
Aug 15, 2026
Merged

Update unstable PHP tag to 8.6.0beta1#194
eiriksm merged 10 commits into
mainfrom
claude/unstable-tag-alpha-3-3atr61

Conversation

@eiriksm

@eiriksm eiriksm commented Aug 15, 2026

Copy link
Copy Markdown
Member

No description provided.

claude and others added 10 commits August 15, 2026 05:37
Keep apcu's from-source build for PHP 8.6: apcu's latest tagged
release (v5.1.28, still current) calls php_verror() with the old
5-argument signature, and PHP 8.6's php_verror() (unchanged in
8.6.0beta1) only takes 4 arguments, so pie/pecl-installing the tagged
release would still fail to compile.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
Reverts the from-source apcu build to confirm whether it's still
needed against 8.6.0beta1, or whether apcu/PHP has since caught up.
Revert this commit if CI shows the build still fails.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
php-ds/ext-ds now fails to build against 8.6.0beta1 too (a new
regression, since it wasn't failing on alpha3), and pie hides the
actual compiler/make error the same way it did for apcu. Add -v here
as well so the real error shows up in the CI log.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
php-ds/ext-ds calls zend_parse_parameter(), which PHP 8.6 removed
entirely (present through 8.5, gone on master/8.6.0beta1). Its
built-in "l" spec handling was just a thin wrapper over the still
public zend_parse_arg_long() inline helper, so patch the one call site
to use that directly instead of pie-installing the (currently
unbuildable) tagged release.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
PHP 8.6 changed the unserialize_callback_func INI global from char* to
zend_string* (OnUpdateString -> OnUpdateStr in main.c), breaking
igbinary's two direct reads of it in igbinary_unserialize_object().
Patch both call sites to pull the C string via ZSTR_VAL() instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
My previous sed-based fix kept a raw char* into
PG(unserialize_callback_func)'s zend_string and re-read it later in
the same function, after invoking arbitrary user PHP code via the
unserialize callback -- if that callback reassigns
unserialize_callback_func, the original zend_string can be freed,
making the later read a use-after-free.

igbinary/igbinary#419 already fixes this upstream (not yet merged) by
taking an owned copy of the string up front. Cherry-pick that commit
instead of carrying a subtly unsafe patch of our own.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
CI confirmed the build now reaches apcu/apcu (past the ext-ds and
igbinary fixes) and fails there exactly as it did on alpha3: apcu's
latest tagged release still calls the removed php_verror() with the
old 5-argument signature. Restore the from-source build.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
msgpack/msgpack-php now fails to build against 8.6.0beta1 too (a new
regression, past the ext-ds/igbinary/apcu breaks already fixed). Split
it out and add -v to see the real compiler/make error.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
msgpack-php reads PG(unserialize_callback_func) as a char*, which PHP
8.6 changed to zend_string*. No upstream fix exists yet, so patch the
two call sites ourselves. Unlike igbinary, msgpack reads the global
only once, before invoking the callback (never re-reads it after), so
a direct ZSTR_VAL/ZVAL_STR_COPY swap is safe -- there's no window for
the callback to free the string out from under a held pointer.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
@eiriksm
eiriksm enabled auto-merge (squash) August 15, 2026 16:40
@eiriksm
eiriksm merged commit cc6a1c3 into main Aug 15, 2026
17 checks passed
@eiriksm
eiriksm deleted the claude/unstable-tag-alpha-3-3atr61 branch August 15, 2026 18:58
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