Skip to content

PHP use-import map 3/5: PhpNameResolver decisive refusal (closes #16) #21

Description

@filipechagas

Parent

Spec: #18 (ticket 3/5). This ticket closes #16.

What to build

A PhpNameResolver mirroring CsharpNameResolver (graphify/extractors/csharp.py:174-296), returning a (node_id, decisive) verdict, consulted in _resolve_php_member_calls (extract.py:3247-3260) in front of the corpus-wide type_def_nids short-name fallback — exactly like the C# call site (extract.py:2870-2885).

Minimal decisive rules for this ticket:

Strictly subtractive: this ticket may only delete edges relative to v8, never add or re-point.

Repro that must go green (from #16 / probe scenario 10 — the canonical copy lives in spec #18)

Two files: App\Local\Client::send() and a caller in App\Http with use Vendor\Sdk\Client; + private Client $c; + $this->c->send(). Today: false edge App\Http\I::go -> App\Local\Client::send INFERRED 0.8. After: no edge.

Constraints

  • Red-first: the repro test must be shown failing before the fix.
  • Decoy discipline: add a positive guard — a caller whose use App\Local\Client; points at the real in-corpus class must KEEP its edge (that path may bind via the existing unique-short-name fallback; it must not regress).
  • Refusal is correct on both full and incremental runs without new markers (the use map belongs to the freshly-dispatched calling file) — but add a mirrored incremental test per test_php_member_calls.py:1544-1878 (_full_then_incremental) proving it.
  • CHANGELOG line naming the deleted-edge class (alias-claimed short names no longer bare-name fallback).

Acceptance criteria

Blocked by

#19 (needs the captured use metadata). #20 extends coverage to fully-qualified annotations but is not required for the alias case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions