Skip to content

feat(symfony): add ExpressionLanguage intelligence - #403

Open
sidux wants to merge 29 commits into
PHPantom-dev:mainfrom
sidux:feat/symfony-expression-language-intelligence
Open

feat(symfony): add ExpressionLanguage intelligence#403
sidux wants to merge 29 commits into
PHPantom-dev:mainfrom
sidux:feat/symfony-expression-language-intelligence

Conversation

@sidux

@sidux sidux commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • configure PHP attribute arguments that contain Symfony ExpressionLanguage strings
  • configure Expression wrapper constructors and bind expression roots to PHP parameters, returns, or classes
  • navigate chained expression members to their PHP declarations
  • diagnose the first missing member from the configured PHP type contract
  • share generic PHP attribute parsing between ExpressionLanguage and event metadata

Why

ExpressionLanguage strings carry PHP-like member access but their root variables come from application contracts that a language server cannot infer from syntax alone. Declarative attribute and constructor rules make that relationship explicit without hardcoding any package or project, so navigation and diagnostics can reuse the normal PHP type engine and remain accurate for custom integrations.

Dependencies

Validation

  • focused ExpressionLanguage navigation and diagnostics tests — 5 passed
  • cargo clippy --fix --allow-dirty -- -D warnings
  • cargo fmt
  • cargo clippy --all-targets -- -D warnings
  • cargo test — 14,167 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 88.29682% with 828 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/code_lens.rs 88.49% 132 Missing ⚠️
src/symfony/container.rs 74.69% 104 Missing ⚠️
src/symfony/events.rs 91.72% 100 Missing ⚠️
src/completion/symfony.rs 83.21% 93 Missing ⚠️
src/call_hierarchy.rs 72.32% 88 Missing ⚠️
src/rename/prepare.rs 58.57% 58 Missing ⚠️
src/indexing/watch.rs 49.54% 56 Missing ⚠️
src/symfony/expressions.rs 93.00% 45 Missing ⚠️
src/references/members.rs 94.62% 23 Missing ⚠️
src/proxy_metadata.rs 93.39% 21 Missing ⚠️
... and 12 more

📢 Thoughts on this report? Let us know!

@AJenbo AJenbo added this to the Sprint 8 milestone Aug 27, 2026
@sidux sidux mentioned this pull request Aug 27, 2026
6 tasks
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/symfony-expression-language-intelligence branch from c667791 to de17890 Compare August 30, 2026 15:33
sidux added 18 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.
Discover opt-in generated subclasses by path and marker interface, then canonicalize external metadata without changing PHP type resolution.
Reuse the existing definition and reference pipelines for standard incoming and outgoing call navigation.
@sidux
sidux force-pushed the feat/symfony-expression-language-intelligence branch from de17890 to 8894f02 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