Stdlib: withhold phantom attribute_exists/class_meth_exists/unitenum_exists/crc32c (#22584)#22625
Merged
Merged
Conversation
…exists/crc32c (#22584) These builtins are absent from php-src basic_functions.stub.php; stop registering/advertising them on all php-src-strict profiles (including PROFILE=8.4). Split isAnonymousClass onto its own forward-profile gate. Restamp gen-0 lowering fingerprint after CompilerVersion.php edit. Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
Owner
Author
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.
Summary
attribute_exists,class_meth_exists,unitenum_exists, andcrc32cfrom registration/function_existson all php-src-strict profiles (includingPHP_COMPILER_PROFILE=8.4/8.5) — absent from php-srcext/standard/basic_functions.stub.php(re-Stdlib: attribute_exists()/class_meth_exists()/unitenum_exists() — phantom function_exists on Zend 8.2 host (ext/reflection, ext/standard) #14995/Stdlib: enable attribute_exists() (PHP 8.4 parity) #17138).isAnonymousClassontosupportsIsAnonymousClass/advertisesIsAnonymousClassso the Stdlib: isAnonymousClass() missing on PHP 8.4 forward profile — undefined function (ext/reflection/php_reflection.c) #19969 forward-profile helper stays gated separately.prelinked/bootstrap-gen0lowering fingerprint afterCompilerVersion.phpedit; refresh inventory method counts.php-src reference
ext/standard/basic_functions.stub.php— noattribute_exists/unitenum_exists/class_meth_exists/crc32c(onlycrc32)PHP implementation
lib/CompilerVersion.php— gates always false for the four phantoms; new isAnonymousClass gateext/standard/BuiltinIntrospectionPolicy.php,ext/reflection/Module.php,script/capability-syntax-lib.phpreflection_probe_builtins_phantom_forward_84.phpt+test/repro/phantom_builtins_profile84.phpTest plan
PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/phantom_builtins_profile84.php→ all=0vendor/bin/phpunit --filter reflection_probe_builtins_phantom|Php84ReflectionProbe|…→ OKmake north-star5-verify-fast→ OK (fingerprinta6745ffd…)./script/check-generated-docs.sh→ OKphpc buildof the repro — blocked on this host by pre-existing LLVM module verify (htmlspecialchars/valueDelrefsignature mismatch; same class of failure asbootstrap-selfhost-link)Closes #22584