Repository navigation
feat(php): bind claimed receiver types to their declared FQNs, with incremental-rebuild parity - #2506
filipechagas wants to merge 24 commits into
Graphify — looks good
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Details
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Graphify review — findings
This pull request adds PHP instance-method call resolution that binds calls on typed receivers (properties, promoted constructor params, natively typed params, new T() locals, nullsafe receivers) to the method's actual class, introduces a new PhpNameResolver that reads use statements/aliases to resolve claimed type names against the corpus, and applies a "refuse-don't-guess" policy for ambiguous receivers (untyped, union/intersection, interface/enum/trait-typed, chained, etc.). It also changes several confidence assignments (typed same-file receivers move from EXTRACTED to INFERRED), routes PHP 8.1 first-class callables to indirect_call instead of calls, and scopes the PHP and Objective-C member-call resolvers to their own language's source suffixes. The changes span the extraction engine, resolution logic, watch/incremental-rebuild handling (persisting refusal-relevant type names), CLI stage timing, and CHANGELOG entries, with a large accompanying set of tests covering PHP member calls, aliases, qualified receivers, mixed-language corpora, and watch/rebuild idempotence. I've described intent and surface area only and have not evaluated whether the behavior is correct.
No blocking issues surfaced.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2517 functions depend on the 1400 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
extract()— 395 callers, 41 callees - worse:
_rebuild_code()— 92 callers, 51 callees - worse:
_extract_generic()— 18 callers, 23 callees - worse:
walk()— 1 callers, 54 callees - new:
_full_then_incremental()— 9 callers, 3 callees - new:
_full_then_incremental()— 7 callers, 3 callees - worse:
walk_calls()— 1 callers, 14 callees - new:
_php_method_receiver_types()— 1 callers, 7 callees - …and 1 more
Verification — 2517 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 2474 function(s) in the blast radius were not formally verified this run