Skip to content

PHP use-import map 4/5: positive alias binding via namespace index #22

Description

@filipechagas

Parent

Spec: #18 (ticket 4/5). Additive recall win; not needed to close #16.

What to build

Use the use-import map to positively bind a short receiver-type name when several same-short-named classes exist in the corpus: use App\Services\X; should select App\Services\X among the candidates (today the len != 1 guard at extract.py:3247-3260 refuses).

Requires a (namespace, simple_name) -> node_id index for PHP, sourced from the php_class_fqns per-file payload (engine.py:5285-5290), consulted by PhpNameResolver (#21).

Constraints

Acceptance criteria

  • Two in-corpus App\A\X / App\B\X; caller with use App\A\X; and typed receiver binds to App\A\X only
  • Aliased import use App\A\X as Y; with private Y $r; binds to App\A\X
  • No use statement → today's unique-short-name behavior unchanged
  • Full suite green vs current v8 baseline; CHANGELOG line for the added-edge class

Blocked by

#21. Releases only together with #23.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions