Skip to content

PHP use-import map 2/5: keep written qualified receiver types (stop flattening FQNs) #20

Description

@filipechagas

Parent

Spec: #18 (ticket 2/5).

What to build

Stop flattening written PHP type annotations to short names. Today _php_name_text (engine.py:671-675) does rsplit("\\", 1)[-1], so private \Vendor\Sdk\Client $c; is indistinguishable from private Client $c;. Only inline-new keeps the written form (receiver_qualified, engine.py:4903).

Thread a qualified form (e.g. receiver_type_qualified) alongside the short name through the receiver-type table for properties, constructor-promoted params, ordinary params, and locals (engine.py:671-675, :717-740, :761-885 _php_method_receiver_types).

Constraints

Acceptance criteria

  • private \Vendor\Sdk\Client $c; stamps both the short name and the written qualified name on the raw-call fact
  • Same for constructor-promoted params, ordinary params, and local variable annotations
  • Unqualified annotations produce facts identical to today plus (at most) an absent/None qualified field
  • All existing PHP member-call tests pass unchanged
  • Full suite green vs the current v8 baseline (reconcile counts; baseline at 102ae79 was 4024 passed / 36 skipped)

Blocked by

#19 (shared parser/metadata groundwork) — soft dependency; can be developed in parallel but must merge after it.

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