Skip to content

feat(symfony): add translation intelligence - #401

Open
sidux wants to merge 22 commits into
PHPantom-dev:mainfrom
sidux:feat/symfony-translation-intelligence
Open

feat(symfony): add translation intelligence#401
sidux wants to merge 22 commits into
PHPantom-dev:mainfrom
sidux:feat/symfony-translation-intelligence

Conversation

@sidux

@sidux sidux commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • discover Symfony translation catalogues and their domains
  • navigate, find, rename, and complete translation keys across PHP, Twig, YAML, XLIFF, and PHP catalogues
  • diagnose missing project-local keys without flagging unknown external domains
  • add CodeLens links between translation usages and catalogue declarations

Why

Translation keys are scoped symbols whose meaning depends on their catalogue domain. Indexing declarations and usages together avoids global string matching, keeps diagnostics from guessing about external catalogues, and gives navigation, rename, completion, and CodeLens identical domain-aware behavior.

Dependencies

Validation

  • focused translation navigation, completion, references, rename, CodeLens, and domain-diagnostic tests
  • cargo clippy --fix --allow-dirty -- -D warnings
  • cargo fmt
  • cargo clippy --all-targets -- -D warnings
  • cargo test — 14,142 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 87.77223% with 539 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/code_lens.rs 87.77% 137 Missing ⚠️
src/call_hierarchy.rs 70.81% 89 Missing ⚠️
src/completion/symfony.rs 84.73% 80 Missing ⚠️
src/rename/prepare.rs 59.42% 56 Missing ⚠️
src/indexing/watch.rs 43.37% 47 Missing ⚠️
src/references/members.rs 94.62% 23 Missing ⚠️
src/proxy_metadata.rs 93.39% 21 Missing ⚠️
src/reference_counts.rs 95.64% 18 Missing ⚠️
src/references/dispatch.rs 77.63% 17 Missing ⚠️
src/resource_navigation.rs 94.05% 17 Missing ⚠️
... and 8 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/symfony-translation-intelligence branch from c7c1b51 to 9ba4602 Compare August 30, 2026 15:33
sidux added 15 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/symfony-translation-intelligence branch from 9ba4602 to 0995004 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