Skip to content

Stdlib: withhold gmp on reference profile without host php-gmp (#22860)#22998

Merged
PurHur merged 1 commit into
masterfrom
fix/22860-gmp-extension-gate
Jul 25, 2026
Merged

Stdlib: withhold gmp on reference profile without host php-gmp (#22860)#22998
PurHur merged 1 commit into
masterfrom
fix/22860-gmp-extension-gate

Conversation

@PurHur

@PurHur PurHur commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Gate ext/gmp advertisement on host extension_loaded('gmp') or PHP_COMPILER_PROFILE=8.4 (CompilerVersion::supportsGmp()), matching Zend builds without php-gmp.
  • Withhold gmp_* / GMP class / module registration on the reference harness; skip functional gmp PHPTs until advertised (phantom kept).
  • php-src: ext/gmp/gmp.c; PHP in ext/gmp + introspection/module registry.

Closes #22860

Test plan

  • php bin/vm.php test/repro/extension_loaded_gmp_phantom.php → all no (matches Zend)
  • PHP_COMPILER_PROFILE=8.4 php bin/vm.php … → all yes
  • vendor/bin/phpunit --filter GmpExtensionPolicyTest → OK
  • vendor/bin/phpunit --filter extension_loaded_gmp_phantom → OK (2)
  • php script/bootstrap-inventory.php --check → OK 6519/6519

Verification transcript

=== ZEND ===
ext=no gmp_add=no GMP=no
=== VM default ===
ext=no gmp_add=no GMP=no
=== VM PROFILE=8.4 ===
ext=yes gmp_add=yes GMP=yes
=== UNIT ===
OK (1 test, 4 assertions)
=== COMPLIANCE phantom ===
OK (2 tests, 2 assertions)
=== inventory ===
OK 6519/6519

Made with Cursor

Match Zend: extension_loaded('gmp') and gmp_*/GMP stay false on the 8.4.0-dev
reference harness; enable via host ext/gmp or PHP_COMPILER_PROFILE=8.4.
Phantom compliance + policy unit coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 33ab5d3 into master Jul 25, 2026
@PurHur
PurHur deleted the fix/22860-gmp-extension-gate branch July 25, 2026 11:06
PurHur added a commit that referenced this pull request Jul 25, 2026
#22998 added ext/gmp/GmpExtensionPolicy.php to the vm.php inventory without
compiler_lib_spine_smoke coverage; release-readiness then failed spine-coverage
/ north-star5-fast (6518/6519). Sync the require, bump footnotes to 6519/6519,
restamp sidecar SHA-1 + lowering fingerprint after master drift (#8713).
Honest verified-fresh remains on #22642/#22717.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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('gmp') + gmp_* callable on default profile — Zend false (ext/gmp)

1 participant