You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stdlib: ReflectionMethod namespace/isClosure/__toString API missing — sibling #22144 (ext/reflection/php_reflection.c) #22173
#22144 tracks ReflectionFunction location/namespace helpers. ReflectionMethod is missing the parallel ReflectionFunctionAbstract surface for namespace naming, closure predicate, and string casting even though Zend exposes them on methods.
Method
Zend 8.2+ on ReflectionMethod
VM (2026-07-22)
getShortName()
method name (e.g. m)
missing
getNamespaceName() / inNamespace()
'' / false for class methods
missing
isClosure()
false for ordinary methods
missing
__toString / (string)$rm
reflection dump
missing / convert Error
Do not duplicate #22144 (function location: getFileName/getStartLine/getDocComment). This issue is method-specific naming/predicate/__toString.
ext/standard/VmReflection.php — wire method reflection objects to the same abstract helpers used for functions where applicable; isClosure() false for methods; __toString matching Zend format is nice-to-have in the same PR if cheap
Repro
./script/docker-exec.sh -- bash -lc 'cat > /tmp/rf_method_ns.php <<'"'"'P'"'"'<?phpnamespace App;class C { public function m() {} }$r = new \ReflectionMethod(C::class, "m");foreach (["getNamespaceName","getShortName","inNamespace","isClosure"] as $m) { echo $m, ":", method_exists($r, $m) ? "yes" : "no", "\n";}if (method_exists($r, "getShortName")) echo "short=", $r->getShortName(), "\n";Pphp /tmp/rf_method_ns.php; echo ---; php bin/vm.php /tmp/rf_method_ns.php'
Done when
getShortName / getNamespaceName / inNamespace / isClosure exist on ReflectionMethod and match Zend for a namespaced class method
Triage note:getNamespaceName / getShortName / inNamespace overlap #22167. Prefer implementing those three on #22167; keep this issue for the remaining isClosure() / __toString() surface (or retitle after #22167 lands).
Activity
PurHur commentedon Jul 22, 2026
Triage note:
getNamespaceName/getShortName/inNamespaceoverlap #22167. Prefer implementing those three on #22167; keep this issue for the remainingisClosure()/__toString()surface (or retitle after #22167 lands).PurHur commentedon Jul 22, 2026
claim: PHP Compiler STD Lib Advanced — batch (issues #22144, #22170, #22171, #22166, #22167, #22169, #22173; sequential PRs)
Queued after #22144.
PurHur commentedon Jul 22, 2026
handoff: PHP Compiler STD Lib Advanced — Reflection batch
Merged this run
Still queued: this issue (and siblings #22166/#22167/#22169/#22173). Claim and continue sequentially.
PurHur commentedon Jul 22, 2026
claim: PHP Compiler STD Lib Advanced — starting #22173 (after merged #22169 / PR #22237)
Note: getShortName/getNamespaceName/inNamespace already shipped in #22167 / PR #22236. This PR covers isClosure + __toString.
Stdlib: ReflectionMethod isClosure/__toString (#22173) (#22239)
PurHur commentedon Jul 22, 2026
Merged #22240 (or see PR link above)
isClosure+__toStringon ReflectionMethod; namespace helpers were #22167.Reflection batch complete: #22166, #22167, #22169, #22173.
PurHur commentedon Jul 22, 2026
Merged #22239
ReflectionMethod::isClosure()+__toString(); namespace helpers were #22167 / PR #22236.Reflection batch complete this run