Skip to content

Stub-shadow fix 1/4: PHP interface/trait/enum declarations mint canonical nodes (RC1 of #46) #47

Description

@filipechagas

Parent

#46 — implements RC1 (the primary root cause). #46's body is the canonical spec: file:line evidence, 7-file minimal-repro recipe, class-vs-interface control experiment, corpus metrics.

What to build

PHP interface/trait/enum declarations mint canonical declaration nodes, exactly as class does today: add interface_declaration, trait_declaration, enum_declaration to _PHP_CONFIG.class_types (graphify/extract.py:1065), mirroring Java (extract.py:936) and Groovy (extract.py:952). Also teach the resolution.py:2688 raw-scan (currently class_declaration only) the new types, so interface-extends-interface edges resolve.

Known caveats (from #46's fix direction 1):

  • enum bodies parse as enum_declaration_list, not declaration_list — check body_fallback_child_types
  • interface/trait/enum methods move from file-scoped to type-scoped ids — assess incremental-rebuild id-shift implications before shipping

Acceptance criteria

Blocked by

None — can start immediately. Highest gate leverage of the three RC slices: per #46, fixing RC1 alone flips gate Q4.

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