Repository navigation
Conversation
…lass's method The engine resolved every PHP member call whose receiver was not capitalised through the file-wide bare-name map, so `$this->branchService->create()` in BranchController bound to BranchController::create (and `$branch->update()` to the controller's own update) before the receiver's declared type was ever consulted. Only `$this->m()` may use that map now; every other instance receiver (typed property, promoted ctor param, typed param, `new X` local, unknown variable, call chain) is deferred to _resolve_php_member_calls. That resolver now also walks in-corpus ancestors and traits (inherits/mixes_in, nearest level wins, ambiguity binds nothing). A method that only a vendor ancestor declares yields no edge instead of a wrong one. The resolver's file gate uses _lang_family so `language.inc=php` overrides still reach it. Table-typed edges stay INFERRED; static/self/parent stay EXTRACTED. AST cache schema 20 -> 21.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.
Not checked: tests were not run; formal verification proved 0 of 2 changed function(s) (2 not verified).
Formal verification. PR-changed functions: 0/2 verified (0 proven, 0 may-equivalent, 0 distinguished) · 2 not verified (1 vacuous, 1 unsupported).
Not verified on this run: \_resolve\_php\_member\_calls (vacuous: never exercised), \_extract\_generic (unsupported).
Graphify review — findings
Fixes PHP member calls binding to the enclosing class's same-named method: only $this->m() resolves locally now, and every other receiver (typed property, promoted or typed parameter, new X local, call chain) is deferred to _resolve_php_member_calls. That resolver types the receiver and uses the new _php_inherited_methods to walk inherits and mixes_in edges breadth-first, so the nearest in-corpus declaration wins, ambiguity binds nothing, and a method declared only in a vendor ancestor gets no edge. Trait methods are treated as one more ancestor level alongside parent classes, so a trait and a parent class declaring the same method at the same depth count as ambiguous rather than ranked. The resolver now gates on _lang_family instead of a .php suffix so language.inc=php overrides still reach it, and the AST cache schema bumps to 21 to retire results from the old binding.
Worth a look
- Trait methods tie with parent-class methods instead of taking precedence —
graphify/extract.py:5881· Escalate · medium- NOT verified (no proof, no reproducing execution) — needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 3974 functions depend on the 792 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
extract()— 989 callers, 59 callees
Verification — 3974 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: 3723 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
437 of 437 test file(s) selected (100%) via static blast radius.
Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.
tests/pi.test.ts— full-run-safetytests/test_affected_cli.py— full-run-safetytests/test_affected_defines.py— full-run-safetytests/test_affected_member_seed.py— full-run-safetytests/test_affected_overrides.py— impact, full-run-safetytests/test_agents_platform.py— full-run-safetytests/test_alias_folding.py— full-run-safetytests/test_analyze.py— full-run-safetytests/test_anthropic_custom_endpoint.py— full-run-safetytests/test_antigravity_install.py— full-run-safetytests/test_apm_fallback_version.py— full-run-safetytests/test_architecture_doc.py— full-run-safetytests/test_astro_extraction.py— impact, full-run-safetytests/test_astro_import_ids.py— impact, full-run-safetytests/test_atomic_canvas_export.py— full-run-safetytests/test_atomic_version_stamp.py— full-run-safetytests/test_atomic_writes.py— full-run-safetytests/test_backend_env_isolation.py— full-run-safetytests/test_backend_extras.py— full-run-safetytests/test_backend_opt_in.py— full-run-safetytests/test_benchmark.py— full-run-safetytests/test_benchmark_raw_graph.py— full-run-safetytests/test_benchmark_real_query.py— full-run-safetytests/test_blade_extractor.py— impact, full-run-safetytests/test_build.py— impact, full-run-safetytests/test_build_located_semantic_identity.py— full-run-safetytests/test_build_merge_dedup_scope.py— full-run-safetytests/test_build_merge_hyperedges_and_prune.py— full-run-safetytests/test_build_merge_shrink_guard.py— full-run-safetytests/test_builtin_global_type_refs.py— impact, full-run-safetytests/test_c_include_resolution.py— impact, full-run-safetytests/test_cache.py— impact, full-run-safetytests/test_cache_stale_import_target.py— impact, full-run-safetytests/test_callflow_html.py— full-run-safetytests/test_cargo_introspect.py— full-run-safetytests/test_cargo_missing_manifest.py— full-run-safetytests/test_carried_hyperedge_remap.py— full-run-safetytests/test_case_sensitive_resolution.py— impact, full-run-safetytests/test_charmap_encoding.py— impact, full-run-safetytests/test_chunking.py— impact, full-run-safetytests/test_cjs_module_extension.py— impact, full-run-safetytests/test_claude_cli_backend.py— full-run-safetytests/test_claude_md.py— full-run-safetytests/test_cli_broken_pipe.py— full-run-safetytests/test_cli_export.py— full-run-safetytests/test_cli_help.py— full-run-safetytests/test_cloud_cta.py— full-run-safetytests/test_cluster.py— full-run-safetytests/test_cluster_ambiguous_scale.py— full-run-safetytests/test_cluster_exclude_hubs.py— full-run-safety- … and 387 more
non-code file(s) changed (
ARCHITECTURE.md) → running the full suite for safety (a code graph can't see config/fixture/data deps)
changed code file(s) with no mapped test (
ARCHITECTURE.md) — a coverage gap or a missing link — running the full suite rather than only the selected tests
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Formal verification
Could not verify: Could not verify \_resolve\_php\_member\_calls.
The verifier did not have enough to check \_resolve\_php\_member\_calls, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: non-vacuity: domain too small (only 1 distinct inputs exercised, need 3) — 'no divergence' would be near-vacuous
Could not verify: Could not verify \_extract\_generic.
The verifier did not have enough to check \_extract\_generic, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: parameter `config` is annotated `LanguageConfig` — outside the synthesizable primitive/collection set
· 1 more finding(s) on lines outside this diff (see the check run).

Branch:
upstream/php-typed-receiver-calls(base:upstream/v8at b90b9df). One commit.Related: #3830 (closed, PHP inter-class member calls) and #2615 (open, PHP consolidated). This is
a different defect in the same area; it does not close either.
Problem
The generic extractor resolved every PHP member call whose receiver was not capitalised through the
file-wide bare-name map before the receiver's declared type was consulted. In a controller:
$this->branchService->create()bound toBranchController::create, and$branch->update()boundto the controller's own
update, whenever the enclosing class had a method of that name. Only$this->m()names the caller's own class. In addition, a typed receiver could not reach aninherited or trait method, and a method declared only by a vendor ancestor got a wrong edge instead
of none.
Implementation
graphify/extractors/engine.py: only$this->m()may use the file-wide bare-name map. Every otherinstance receiver (typed property, constructor-promoted parameter, typed parameter,
new Xlocal,unknown variable, call chain) is deferred to
_resolve_php_member_calls.graphify/extract.py:_resolve_php_member_callsnow also walks in-corpus ancestors and traits(
inherits/mixes_in, breadth first, nearest level wins, ambiguity binds nothing) through thenew
_php_inherited_methods. A method that only a vendor ancestor declares yields no edge. Theresolver's file gate uses
_lang_family, so alanguage.inc=phpoverride still reaches it.Table-typed edges stay
INFERRED; static /self/parentcalls stayEXTRACTED.graphify/cache.py: AST cache schema 20 -> 21 (raw call output changes).ARCHITECTURE.md: paragraph on the receiver rule.Verification
New tests:
tests/test_php_typed_receiver_calls.py(8 tests: promoted property, typed property,typed parameter, method inherited from a vendor class gets no edge, inherited in-corpus method, trait
method,
$this->m()still binds to the own method, unknown receiver does not fall back to the ownmethod).
Fails before, passes after (unmodified
graphify/ofupstream/v8):Full checks on this branch:
Bare
upstream/v8(b90b9df) gives1 failed, 8469 passed, 15 skipped, ruff clean and the same641 errorsfrom pyright. The one failure is pre-existing and identical onv8:tests/test_skill_no_backtick_substitution.py::test_control_a_backticked_unknown_command_is_caught.Before/after on two real Laravel applications (private copies,
uv run graphify update <copy> --forcefrom this branch and from bare
upstream/v8). "Own-class typed-receiver call" = acallsedge betweentwo methods of the same class whose source line is
$x->m()/$this->x->m()(a regex over thesource line, so it can over-count):
callsedgescallsedges, totalcallspairs removed / addedThe one remaining match in app B is a line that contains both
self::position(...)and$service->position(...); the edge is theself::call and is correct. Pairs removed are the wrongbindings plus edges that are now bound to the typed receiver's class instead (hence the added pairs).
Limitations
mixed, dynamic) gets no edge instead ofa guessed one.
__call, macros or facades are not modelled.