Skip to content

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

Closed

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.

Activity

  1. added
    ready-for-agent
    on Aug 5, 2026
  2. added a commit that references this issue on Aug 5, 2026
  3. filipechagas commented on Aug 5, 2026

    @filipechagas
    CollaboratorAuthor

    Closed by PR #31. Orchestrator gate evidence: independent full-suite runs reproduced 4068/36 at branch head (pre-#26 baseline 4057/36 + 11 new tests) and 4072/36 on the merged tree (post-#26 baseline 4061/36 + 11). Parity additionally evidenced by a byte-identical extract() graph against v8 over a corpus covering all four annotation positions, and a tree-wide 782-blob merge verification. v8 baseline is now 4072/36. #21 is fully unblocked (deps #19, #20, #26 all merged).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions