Skip to content

fix(php): keep inferred references for vendor attributes (#144) - #357

Open
Frankie-Xu wants to merge 1 commit into
trailhq:mainfrom
Frankie-Xu:fix/144-php-external-attribute-refs
Open

fix(php): keep inferred references for vendor attributes (#144)#357
Frankie-Xu wants to merge 1 commit into
trailhq:mainfrom
Frankie-Xu:fix/144-php-external-attribute-refs

Conversation

@Frankie-Xu

Copy link
Copy Markdown
Contributor

Summary

Closes #144

Test plan

  • Fixture with use Symfony\...\Route and no Route class in repo → inferred references edge
  • Existing in-repo attribute fixture still extracted
  • node --import tsx --test test/graph-php.test.ts

Made with Cursor

github-actions Bot added a commit that referenced this pull request Sep 11, 2026
@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

🌱 graft blast radius

1 area changed → 3 areas can be affected. 5 dependent symbols, depth 2.
Tests: Graph Resolution has tests the diff did not touch.
Tag: @anirudhkumar-nanonets — Pull Request Review · @shhdwi — 3 of 4 areas · @tpoignonec — Graph Building

flowchart TB
  A0(("Graph Building<br/>2 symbols"))
  A1(("Pull Request Review<br/>2 symbols"))
  A2(("graph<br/>1 symbol"))
  classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
  class A0,A1,A2 reached;
Loading
Can be affected Symbols Nearest hop Reached from
Graph Building 2 src/graph/build.ts:L151-L410 buildGraph — calls, depth 1 Graph Resolution
Pull Request Review 2 src/app/brain-build.ts:L251-L358 readRepository — calls, depth 2 Graph Resolution
graph 1 src/engine.ts:L91-L101 graph — calls, depth 2 Graph Resolution
Who knows this code — 3 people across 4 areas
Area Who knows it
Graph Resolution · changed @shhdwi — 1 commit, last 15d ago
Graph Building · affected @tpoignonec — 1 commit, last 15d ago · @shhdwi — 1 commit, last 15d ago
Pull Request Review · affected @anirudhkumar-nanonets — 8 commits, last yesterday
graph · affected @shhdwi — 1 commit, last 15d ago

Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no @ has no GitHub handle in its commit email — tag them by hand, or add a .mailmap entry. A suggestion from history, not a CODEOWNERS rule.

All 5 dependent symbols, grouped by area

Graph Building — 2 symbols in 2 files

  • src/graph/build.ts:L151-L410 — buildGraph (calls, depth 1)
  • src/graph/refresh.ts:L150-L227 — ensureFreshGraph (calls, depth 2)

Pull Request Review — 2 symbols in 2 files

  • src/app/brain-build.ts:L251-L358 — readRepository (calls, depth 2)
  • src/app/review.ts:L45-L99 — reviewPullRequest (calls, depth 2)

graph — 1 symbol in 1 file

  • src/engine.ts:L91-L101 — graph (calls, depth 2)
Test signal per changed area — 1 ⚠

Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.

  • Graph Resolution — 1 of 1 reached · 4 test files reach it, none changed here
34 test suites also reference this code

37 symbols, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.

  • test/ask-index.test.ts
  • test/ask.test.ts
  • test/container-extract.test.ts
  • test/context-only-dir.test.ts
  • test/context.test.ts
  • test/covers.test.ts
  • test/generic-extract.test.ts
  • test/graph-cross-language.test.ts
  • test/graph-go.test.ts
  • test/graph-incremental.test.ts
  • test/graph-invariants.test.ts
  • test/graph-java.test.ts
  • test/graph-languages.test.ts
  • test/graph-posix-paths.test.ts
  • test/graph-python.test.ts
  • test/graph-r-classes.test.ts
  • test/graph-r-phase3.test.ts
  • test/graph-r-phase4.test.ts
  • test/graph-r-phase5.test.ts
  • test/graph-r.test.ts
  • …14 more

graft blast · refs/graft/base...HEAD · depth 2 · 3 changed files

Open the interactive graph → — click an area to see the code that changed, and the line that reaches it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PHP: attribute usage and anonymous classes are not extracted

1 participant