Skip to content

feat(frameworks): add Symfony and Doctrine resource navigation - #397

Open
sidux wants to merge 16 commits into
PHPantom-dev:mainfrom
sidux:feat/framework-resource-navigation
Open

feat(frameworks): add Symfony and Doctrine resource navigation#397
sidux wants to merge 16 commits into
PHPantom-dev:mainfrom
sidux:feat/framework-resource-navigation

Conversation

@sidux

@sidux sidux commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add bidirectional navigation between PHP declarations and Symfony or Doctrine YAML/XML resources
  • add declaration CodeLens links for controller methods and Doctrine entity/repository relationships
  • keep resource lookups incremental with inverted class/member indexes and cached Doctrine mappings
  • preserve navigation fallbacks when a configured destination is not already loaded

Why

Framework configuration contains PHP classes, controller methods, paths, and Doctrine mappings that are invisible to the PHP AST index. Generic FQCN navigation covers direct class strings, but reverse relationships such as entity-to-repository and route-to-controller still need a lightweight resource model. Indexing that model once also prevents every CodeLens from rescanning all configuration files.

Dependencies

Validation

  • cargo clippy --fix --allow-dirty -- -D warnings
  • cargo fmt
  • cargo clippy --all-targets -- -D warnings
  • cargo test — 14,123 passed, 12 ignored

@codecov-commenter

codecov-commenter commented Aug 27, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 84.38703% with 568 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/framework.rs 81.39% 194 Missing ⚠️
src/code_lens.rs 85.77% 133 Missing ⚠️
src/rename/prepare.rs 30.97% 78 Missing ⚠️
src/references/dispatch.rs 43.28% 38 Missing ⚠️
src/indexing/watch.rs 27.45% 37 Missing ⚠️
src/definition/resolve.rs 32.60% 31 Missing ⚠️
src/references/members.rs 94.62% 23 Missing ⚠️
src/reference_counts.rs 95.64% 18 Missing ⚠️
src/resource_navigation.rs 96.81% 8 Missing ⚠️
src/reference_index.rs 94.73% 6 Missing ⚠️
... and 2 more

📢 Thoughts on this report? Let us know!

sidux added 7 commits August 30, 2026 17:12
Use the coarse reference index for conclusive zero counts and cache bounded exact member locations for non-zero lenses. Refresh-capable clients avoid eager resolve storms while older clients retain lazy resolution.
Stop reference counts and CodeLens resolves from repeating the full workspace walk for every declaration. Internal annotation requests share the initial index, including callers queued behind it, while an explicit Find References command keeps its single refresh for files created without watcher notifications.
@sidux
sidux force-pushed the feat/framework-resource-navigation branch from 9d9b8d9 to fb98862 Compare August 30, 2026 15:33
sidux added 9 commits August 30, 2026 17:40
Resolve fully-qualified classes and Class::member references from arbitrary YAML and XML positions without schema-specific rules.
Feed schema-free class and member occurrences into Find References and CodeLens, including transparent-proxy metadata aliases.
Index semantic framework relationships alongside generic YAML and XML class references.
Pass every indexed target to editor-native navigation and ignore empty PHP resource strings.
Generic YAML and XML navigation now returns early only when it resolves a PHP symbol. Otherwise the semantic Symfony resolver still handles aliases, form fields, validation mappings, and configuration keys.
Build entity-to-repository pairs alongside the framework resource index and update them per URI. CodeLens and reference lookups now read the derived index instead of reopening and rescanning every YAML/XML resource for each declaration.
@sidux
sidux force-pushed the feat/framework-resource-navigation branch from fb98862 to 6106c78 Compare August 30, 2026 15:54
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.

3 participants