Skip to content

Tracking: PHP fork fixes — upstream PR status and the not-yet-opened queue #56

Open

Description

@filipechagas

Umbrella tracker for the PHP work this fork exists for: what started it, what we found on the way, what is already proposed upstream, and what is still waiting on a dependency before it can be proposed.

Fork is at 0.9.39 (v8 @ 93657ef, fork PR #57 merged 2026-08-07). Everything in sections 1, 2 and 3a–3b has landed on the fork. Nothing has merged upstream yet — all seven upstream PRs are OPEN with no review decision (checked 2026-08-07).


1. The original issue and its fix

What Where State
Original upstream bug — PHP member/instance calls never resolve to calls edges; only ClassName::method() works Graphify-Labs#1682 (filed by distribuidornexvia, 2026-07-05) OPEN upstream
Fork tracking issue + slices #1 (parent), #2 #3 #4 #5 #6 #7 (implementation slices), #11 #12 #13 #14 (defects found while building it) all CLOSED
Fork PR #17 feat/php-member-calls-1682 MERGED
Upstream PR Graphify-Labs#2492 — fix(php): resolve instance-method calls edges from typed receivers (#1682) OPEN

2. Everything else we found, and where it is upstream

Each row: fork issues → fork PR(s) that landed it → the upstream PR carrying it.

Fork issues Fork PR(s) Upstream PR Upstream issue Stacking
#19 (capture use FQN/alias metadata), #26 (group-form use function/use const leak) #29, #30 2502 — independent
#8, #10, #24, #33 (cross-language leakage: receiver-type indexes, raw-call ownership, import edges) #28, #34 2503 — independent
#15 (first-class callables → indirect_call), #9 (union/intersection receivers), #20 (qualified receiver types), #16/#21 (use-claim refusal) #27, #25, #31, #32 2505 — stacked on 2492 + 2502
#18 (spec), #22 (declared-FQN positive binding), #23 (incremental parity marker) #35 2506 — stacked on 2505
#37 (relational verbs hijack seed selection), #40, #41, #42, #43 #44, #45 2516 2507 — we filed it; maintainer CLOSED it 2026-08-07 after landing the relational-verb demotion in upstream 0.9.35. 2516 carries the two failure modes that survived that fix. independent
#46 (node identity / stub shadowing) → #47 (mint interface/trait/enum nodes), #49 (find_node_ambiguity sourceless rivals), #39 (relative-scope callees) #51 2536 — independent (based on v8 @ 9f25a3a)

So: one upstream issue we filed (2507, closed), one pre-existing upstream issue we're fixing (1682, open), and seven upstream PRs open. The rest of the ~35 fork issues are our own decomposition and never needed an upstream ticket.

Suggested merge order for the maintainer, if asked: 2492 → 2502 → 2505 → 2506 (that chain must go in order); 2503, 2516, 2536 are independent and can go any time.


3. Fixes that have NOT been proposed upstream yet

3a. Landed on the fork (PR #51 / 0.9.38), deliberately held back — dependency-blocked

Both are named in 2536's body as "two sibling fixes deliberately not in this PR".

3b. Landed on the fork (PR #57 / 0.9.39, MERGED 2026-08-07), not yet proposed upstream

All three issues CLOSED on the fork with acceptance + corpus-grading evidence (−1,341 fabricated calls edges, +2,398 legitimate, on the 46.6k-node api rebuild).

3c. Investigated and written off — no code change anywhere

3d. Triaged ready-for-agent on the fork, not implemented anywhere yet


Definition of done for this tracker

Close when: 2492, 2502, 2503, 2505, 2506, 2516 and 2536 have all merged (or been declined) upstream, and every checkbox in section 3 is either merged upstream or explicitly written off as fork-only (#55 already is).

Next concrete action, unblocked today: open #52 upstream standalone — it is the only unshipped item in section 3 with no upstream dependency. (The fork PR for 0.9.39 is done: #57, merged.)

Activity

  1. filipechagas commented on Aug 7, 2026

    @filipechagas
    CollaboratorAuthor

    Sync check + upstream nudge (2026-08-07)

    Fork is not drifted: git rev-list --left-right --count upstream/v8...v8 → 0 59. Zero behind, 59 ahead. upstream/v8 HEAD is still 9f25a3a (2026-08-06 17:29, v0.9.35) — nothing new upstream since their Graphify-Labs#2507 fix, which we absorbed the same day in fork PR #45. Fork 0.9.38 vs upstream 0.9.35.

    One deliberate divergence in shared code to remember at merge time: the 0.9.37 sync replaced upstream's hardcoded _RELATIONAL_INTENT_TERMS with a derived superset (graphify/serve.py:851-869) that absorbs all twelve of their words. Disclosed to the maintainer in 2516's description.

    On 2507 being closed: upstream fixed 1 of the 3 failure modes we reported (the relational-verb demotion), and 0.9.35's caller/callers addition to _CONTEXT_HINTS introduced a regression our C3 repairs — "callers of X" went from 147 nodes / 3 callers buried (0.9.34) to 1 node / 0 of 3 delivered confidently (0.9.35). 2516 remains OPEN and is the live carrier for the other two modes; the only reviews on it are from graphify-labs[bot], not the maintainer.

    Posted, so the closed issue does not imply the whole report is resolved:

  2. filipechagas commented on Aug 7, 2026

    @filipechagas
    CollaboratorAuthor

    Upstream review round handled + corrections to this tracker (2026-08-07)

    Review triage: 28 unresolved threads, 1 substantive

    Audited every unresolved review thread across the seven upstream PRs. 2502 and 2503 have none. Of the other 28, 25 were automated coupling-metric flags (several posted twice) and 2 were the bot's "agreed by 2 of 2 members but NOT verified" class — one of those (2516 serve.py) was already handled in 234c5f0 and is marked outdated.

    That left exactly one thread needing work: 2536 engine.py:584, "relative-scope PHP calls silently dropped", proposing that parent::/self::/static:: emit an unqualified callee instead of being refused. Declined, with measurements — reply:

    • The suggested edit patches _php_name_text (engine.py:579-586), which the scoped_call_expression branch never calls — it reads its scope via _read_text at engine.py:4386. Applied literally it changes _php_collect_type_refs/_php_emit_base and leaves relative-scope calls untouched.
    • Applied as intended and measured on a PHPUnit-shaped corpus: baseline 0 edges → 1 fabricated INFERRED edge (FooTest::prepare() → App\Models\ServiceCategory::setUp()). is_member_call=False means it reaches the shared normalized-label loop, whose index keys .setUp() and setUp() identically → sole candidate → unconditional bind. Same shape as #39, different label.
    • #52's filter does not cover it — verified by building a third tree with #52 applied (still 1 edge). It is gated on the php_function_call marker, and #52's own comment says why it cannot widen to scoped calls.

    Follow-ups opened: #58 (the real fix — base-class-aware resolution via inherits; the raw-call record carries no enclosing/base class today) and #59 (opportunistic _php_member_receiver() extraction from walk_calls; explicitly not worth amending an open PR for).

    Coupling flags answered as one consolidated comment per PR (2492, 2505, 2506, 2516, 2536) rather than 25 near-identical thread replies. No code changed. The findings that made that defensible:

    • _php_method_receiver_types and _resolve_php_member_calls do not exist at base 07b9143d — both introduced by 43cd7a2. No baseline, so no regression.
    • resolve_seed: production fan-in unchanged at 1 (format_affected); all 5 added callers are tests in a new file. Its 8→10 callee bump is the extraction of _is_sourced/_prefer_sourced_node — the metric penalised a decomposition.
    • walk_calls: the only genuine delta, 13→14 callees, difference is exactly one symbol, on a function already 577 lines at base (734 at head).

    Corrections to the issue body above

    Section 3b is stale — that work moved while this tracker was being written:

  3. filipechagas commented on Aug 7, 2026

    @filipechagas
    CollaboratorAuthor

    Body updated for the 0.9.39 merge (2026-08-07)

    What changed since the last correction comment:

  4. filipechagas commented on Aug 11, 2026

    @filipechagas
    CollaboratorAuthor

    Consolidation executed (2026-08-11): upstream strategy changed — everything now rides one PR.

    Definition of done, superseded: read the old list ('2492…2536 merged or declined') as 'Graphify-Labs#2617 merged or declined', plus the standing section-3 rule (every item merged upstream, riding Graphify-Labs#2617, or written off). Next concrete action: respond to maintainer review on Graphify-Labs#2617.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions