chore: support PHP 8.4 and 8.5 in parallel (+ adapt to current z-engine hashtable API) - #14
Merged
Merged
Conversation
z-engine removed PersistentHashTable::create() in favour of an owning constructor, and HashTable's one-argument wrapping constructor along with releaseReference(). The old wrapping call in detach() silently allocated a fresh table (PHP ignores extra constructor arguments) and released that instead of the rebuilt dynamic-properties table, leaking it on every attach/detach cycle - the flat-memory soak gate caught the growth. Release the table the way zend_array_release() does: drop the reference and hand the zero-refcount array to rc_dtor_func so the engine dismantles it through its own allocator. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5XNnAjcG8xSxun92V23Sm
Widen php to ^8.4 and require z-engine as 8.4.x-dev || 8.5.x-dev so Composer resolves the line matching the running minor. Run every CI job - unit/lifecycle, both soaks and the FastCGI request-boundary gate - on both minors, and refresh the badge and requirements docs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5XNnAjcG8xSxun92V23Sm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two commits:
1.
fix: adapt to z-engine's owned-vs-borrowed hashtable constructionz-engine's
a56d59drefactor removedPersistentHashTable::create()(now an owning zero-argument constructor) andHashTable's one-argument wrapping constructor +releaseReference().mainno longer installs cleanly against either current z-engine line — every test errored withCall to undefined method PersistentHashTable::create().Persister/Registry:PersistentHashTable::create()→new PersistentHashTable().PersistentStore::detach(): the old(new HashTable($ptr))->releaseReference()call had become a silent leak — PHP ignores extra constructor arguments, so it allocated a fresh table and released that, leaking the rebuilt dynamic-properties table every attach/detach cycle (~340 B/cycle, caught by the flat-memory soak gate). Now mirrorszend_array_release(): decrement the refcount and hand the zero-refcount array torc_dtor_funcso the engine frees it through its own allocator.2.
chore: support PHP 8.4 and 8.5 in parallelcomposer.json:php: ^8.4,lisachenko/z-engine: 8.4.x-dev || 8.5.x-dev(replacesdev-master || ^8.4). Verified: Composer resolves8.4.x-devon PHP 8.4 anddev-master(aliased8.5.x-dev) on PHP 8.5.['8.4', '8.5']matrix.8.4 | 8.5; requirements section replaces the stale note about the temporaryclaude/shared-objects-dag-memory-nq462wz-engine pin.Validation (local, fresh installs per minor)
vendor/bin/phpunit(39 tests)tools/soak.php 5000tools/soak-drop.php 5000cgi-fcgiunavailable in sandbox) — CI covers it🤖 Generated with Claude Code
https://claude.ai/code/session_01Y5XNnAjcG8xSxun92V23Sm
Generated by Claude Code