Skip to content

ext/zip: withhold extension_loaded/ZipArchive on reference profile (#18137) - #18159

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-18137-zip-extension-phantom
Jul 12, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-18137-zip-extension-phantom

Conversation

@PurHur

@PurHur PurHur commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Gate extension_loaded('zip'), ZipArchive, and zip_* procedural API behind CompilerVersion::supportsZip() (msgpack/brotli pattern) so the 8.4.0-dev reference harness matches Zend without ext/zip
  • Register zip module under standard with logical zip extension name only when advertised; forward profile enables via PHP_COMPILER_PROFILE=8.4
  • Add repro + compliance guards; skip functional zip PHPTs on reference profile in VMTest/JITTest

php-src reference

  • ext/zip/php_zip.c — module init registers extension + classes together
  • ext/standard/info.c — extension_loaded() reflects loaded modules only

Verification

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_zip_extension_phantom.php'
# ok

./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r "echo extension_loaded(\"zip\")?1:0; echo \" \"; echo class_exists(\"ZipArchive\",false)?1:0; echo \" \"; echo function_exists(\"zip_open\")?1:0;"'
# 0 0 0

./script/docker-exec.sh -- bash -lc 'PHP_COMPILER_PROFILE=8.4 php bin/vm.php -r "echo extension_loaded(\"zip\")?1:0; echo \" \"; echo class_exists(\"ZipArchive\",false)?1:0; echo \" \"; echo function_exists(\"zip_open\")?1:0;"'
# 1 1 1

./script/docker-exec.sh -- bash -lc 'vendor/bin/phpunit test/compliance/VMTest.php --filter extension_loaded_zip'
# OK (2 tests, 2 assertions)

Closes #18137

Made with Cursor

Withhold extension_loaded('zip'), ZipArchive, and zip_* from introspection
on the 8.4.0-dev reference harness to match Zend without ext/zip, following
the ext/msgpack pattern. Enable via PHP_COMPILER_PROFILE=8.4.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit a2db92e into master Jul 12, 2026
@PurHur
PurHur deleted the agent/issue-18137-zip-extension-phantom branch July 12, 2026 06:24
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.

Regression: extension_loaded('zip') + ZipArchive phantom — advertises without ext/zip (re-#11676, ext/zip/php_zip.c)

1 participant