chore: pin z-engine to the released 8.4 line - #13
Conversation
z-engine 8.4.0 is tagged and on Packagist, and its master now targets PHP 8.5 - keeping the dev-master alternative would break this PHP 8.4 library on the next update. With the dev dependency gone, the minimum-stability/prefer-stable overrides have nothing left to cover. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HRDZ2XsoVuB5uG4qXKL3ny
z-engine's owned-vs-borrowed construction split (a56d59d, part of the 8.4.0 release) replaced PersistentHashTable::create() with plain construction - update all call sites. This is what broke CI once the dependency resolved to the tag instead of the pre-refactor dev-master. Also per review feedback: require ~8.4.0 instead of ^8.4 - z-engine minors track PHP minors and are not interchangeable, so the constraint mirrors php ~8.4.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HRDZ2XsoVuB5uG4qXKL3ny
The flat-memory soak grew ~450 bytes per attach/detach cycle (+2237912 over 5000, budget 65536) once the dependency resolved to z-engine 8.4.0. z-engine's owned-vs-borrowed construction split (a56d59d) repurposed the HashTable constructor: it no longer wraps an existing engine table, it CREATES a new owned one, and borrowed views moved to HashTable::fromCData(). The new constructor takes no arguments, so `new HashTable($dynamicProperties)` silently ignored the pointer and minted a fresh table on every detach. That table was registered in z-engine's tracked-block registry and never released, while the object's own properties table - the one this code exists to free - kept its reference and survived to request end. releaseReference() was dropping the refcount of the throwaway table instead. Bisected to get_object_vars() in the soak loop, which is what makes the engine rebuild the properties table in the first place; every other mutation in that loop was already flat. soak.php 5000 goes from +2237912 to -1728 bytes. phpunit stays 39/39. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HRDZ2XsoVuB5uG4qXKL3ny
|
Status: everything on this PR is done except the Reclaiming soak job, which is blocked on an upstream z-engine 8.4.0 regression — Also note: some earlier red checks here were the GitHub Actions incident (jobs died resolving actions before any step ran) — re-runs, not code changes, are the cure for those. Generated by Claude Code |
|
Rebase and allow both 8.4 and 8.5 PHP (^8.4) and both dev versions of z-engine 8.4.x-dev | 8.5.x-dev ( drop last commit on rebase if not needed ) |
|
Rebased onto current
Generated by Claude Code |
Replaces
dev-master || ^8.4onlisachenko/z-enginewith^8.4— completing the pin that PR #8 prepared (tracked in lisachenko/z-engine#95).Why now: z-engine
8.4.0is tagged and live on Packagist, and z-engine'smasterhas moved to PHP 8.5 (lisachenko/z-engine#134) — thedev-masteralternative would break this PHP 8.4 library on its next dependency update. The 8.4 line is maintained on z-engine's8.4branch.Also removes
minimum-stability: dev/prefer-stable: true: z-engine was the only dev-versioned constraint, so the overrides no longer cover anything.Verified locally with PHP 8.4.19:
composer validate --strictpasses andcomposer update --dry-runresolveslisachenko/z-engine (8.4.0).Outlook: this pins the library to the 8.4 line so a
1.xbranch can later be forked for PHP 8.4 maintenance whilemastermoves to the z-engine 8.5 dev dependency.🤖 Generated with Claude Code
https://claude.ai/code/session_01HRDZ2XsoVuB5uG4qXKL3ny
Generated by Claude Code