feat(opcache): ZTS support for the file-cache relocator - #267
Conversation
f057e9d to
040e736
Compare
|
Rebase and fix conflicts |
Lift the ZTS refusal in PayloadRelocator (isSupported() and the constructor throw). The refusal was precautionary, not structural: zend_file_cache.c (PHP-8.4.19) contains no thread-safety conditionals, and a field-by-field diff of the generated layouts.json for linux-x64-nts vs linux-x64-zts shows every struct the walker dereferences (zend_persistent_script, zend_file_cache_metainfo, zend_op_array, zend_class_entry, zend_string, Bucket, zval, ...) is byte-identical - only zend_executor_globals, zend_compiler_globals and zend_module_entry differ, none of which appear in a payload. No layout-dependent walking needed adapting. Config/docs follow: composer.json's test:opcache-zts drops the --exclude-group opcache-relocator exclusion (name kept as the alias CI's ZTS legs call), ci.yml's ZTS matrix comments/gates and the debug-job ZTS opcache_args now cover the full opcache group, AGENTS.md and docs/opcache-binary.md describe ZTS as supported, and the relocator tests' skip message no longer names ZTS. Acceptance evidence: - z-engine-php:debug84-zts container (PHP 8.4.24 ZTS DEBUG, built from tools/docker/php-debug.Dockerfile with PHP_TS=zts): `phpunit --group opcache --fail-on-skipped` with NO relocator exclusion - OK (47 tests, 318 assertions), zero skips: every relocator test ran and passed on ZTS, byte-identical round trips included - host NTS: full default suite (519 tests, skip/incomplete counts unchanged), --group opcache --fail-on-skipped OK (47), z-engine-php:debug84 NTS container OK (47), phpstan level max clean, php-cs-fixer clean Fixes #118 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BDcCQiYqbMkjRPyhWgLL6M
67fee31 to
fb8bda9
Compare
|
Rebased — the whole #267→#271 stack is replayed onto current Two real conflicts were resolved further up the stack (not in this PR): Generated by Claude Code |
What this changes
Fixes #118 — now based directly on
8.4(the relocator-coverage chain #256–#260 has merged; this branch was rebased onto the current tip and carries only its own commit).Lifts the ZTS refusal in
PayloadRelocator::isSupported()+ constructor. The refusal was precautionary, not structural:zend_file_cache.chas zero thread-safety conditionals, and a field-by-field diff of the generatedlayouts.json(linux-x64-nts vs -zts) shows every struct the walker dereferences is byte-identical — onlyzend_executor_globals/zend_compiler_globals/zend_module_entrydiffer, none of which appear in a payload. So no layout-dependent walking needed adapting and no generator changes.Config/docs:
composer.jsontest:opcache-ztsdrops--exclude-group opcache-relocator(name kept as CI's alias),ci.ymlZTS matrix + Windows-job ZTSopcache_argsnow cover the full group, AGENTS.md + docs mark ZTS supported, ZTS-naming skip messages removed.Environment it was verified on
php -v): PHP 8.4.19 (cli) NTS host; validation on a locally-built PHP 8.4.24 ZTS--enable-debugcontainer (tools/docker/php-debug.Dockerfile --build-arg PHP_TS=zts)--enable-debug)? yes — ZTS debug container:--group opcache --fail-on-skippedWITHOUT the relocator exclusion = OK (47 tests, 318 assertions), zero skips — every relocator test ran and passed on ZTSAlso: host full suite 519 tests, opcache gate 47, debug84 NTS 47; PHPStan level max clean; cs-fixer clean.
Checklist
8.4)composer testpasses on the matching PHP minorcomposer phpstan(level max) andcomposer cs:checkare greentools/generator/symbols.phpunchanged — nothing underinclude/,stubs/or.phpstorm.meta.phptouched🤖 Generated with Claude Code
https://claude.ai/code/session_01BDcCQiYqbMkjRPyhWgLL6M
Generated by Claude Code