Skip to content

Stdlib: method_exists/property_exists Reflection $object_or_class untyped (#30244) - #30335

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-30244-method-property-exists-reflection
Aug 11, 2026
Merged

Stdlib: method_exists/property_exists Reflection $object_or_class untyped (#30244)#30335
PurHur merged 1 commit into
masterfrom
agent/issue-30244-method-property-exists-reflection

Conversation

@PurHur

@PurHur PurHur commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • Issue repro (Zend + VM):
    ./script/docker-exec.sh -- bash -lc 'php -r "…" && php bin/vm.php test/repro/method_exists_property_exists_object_or_class_untyped.php'
    Output: both functions object_or_class ty=-; method/property still string; return bool.
  • ./script/phpunit.sh --filter MethodExistsPropertyExistsObjectOrClassUntypedVMTest → OK (1 test)
  • ./script/phpunit.sh --filter 'testMethodExistsPropertyExistsObjectOrClassUntyped|testMethodExistsAndPropertyExistsZendStubNamedParams' → OK (2 tests, 30 assertions)
  • Named args still work: method_exists(object_or_class: DateTime::class, method: "__construct") → true

Verification transcript

method_exists p0=object_or_class ty=-
method_exists p1=method ty=string
method_exists ret=bool
property_exists p0=object_or_class ty=-
property_exists p1=property ty=string
property_exists ret=bool

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

…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>
@PurHur
PurHur merged commit 7b9d9a1 into master Aug 11, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-30244-method-property-exists-reflection branch August 11, 2026 18:20
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: method_exists/property_exists Reflection object_or_class typed object|string — Zend untyped (re-#23399, zend_builtin_functions.stub.php)

1 participant