Stdlib: method_exists/property_exists Reflection $object_or_class untyped (#30244) - #30335
Merged
PurHur merged 1 commit intoAug 11, 2026
Merged
Conversation
…in Reflection (#30244) Match Zend/zend_builtin_functions.stub.php — InternalArgInfo still advertises object|string, so clear it via stubParamTypeOverride for php-src-strict Reflection. Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks
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
object|stringonmethod_exists/property_exists$object_or_classso it matches Zend untyped stubs (Zend/zend_builtin_functions.stub.php).BuiltinInternalArgInfo::stubParamTypeOverride(empty string), same pattern asclass_parents(Regression: class_implements/parents/uses Reflection return array + autoload default false — Zend array|false / true (Zend/zend_builtin_functions.stub.php) #25498). Names/named-args from Regression: method_exists/property_exists Reflection names object/property_name — Zend object_or_class/property; named args rejected (Zend/zend_builtin_functions.stub.php) #23399 unchanged.Test plan
./script/docker-exec.sh -- bash -lc 'php -r "…" && php bin/vm.php test/repro/method_exists_property_exists_object_or_class_untyped.php'object_or_class ty=-; method/property stillstring; returnbool../script/phpunit.sh --filter MethodExistsPropertyExistsObjectOrClassUntypedVMTest→ OK (1 test)./script/phpunit.sh --filter 'testMethodExistsPropertyExistsObjectOrClassUntyped|testMethodExistsAndPropertyExistsZendStubNamedParams'→ OK (2 tests, 30 assertions)method_exists(object_or_class: DateTime::class, method: "__construct")→ trueVerification transcript
Pillar 1 preflight (this host):
user_release_ready=yes; inventory OK 7364/7364; north-star5-fast ok (gen-0 seed stale warning only).Made with Cursor