Skip to content

feat(symfony): add events and Messenger intelligence - #402

Open
sidux wants to merge 28 commits into
PHPantom-dev:mainfrom
sidux:feat/symfony-events-messenger-intelligence
Open

feat(symfony): add events and Messenger intelligence#402
sidux wants to merge 28 commits into
PHPantom-dev:mainfrom
sidux:feat/symfony-events-messenger-intelligence

Conversation

@sidux

@sidux sidux commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • read final Symfony event-listener wiring from generated container PHP without loading or executing it
  • make publisher and subscriber attributes declarative through .phpantom.toml
  • navigate events, messages, handlers, and Messenger buses across PHP and Symfony resources
  • expose publisher → event → subscriber relationships through standard LSP Call Hierarchy nodes
  • attribute publisher and listener metadata from configured transparent proxies to their real classes
  • index Messenger class mappings for constant-time candidate lookup by class

Why

Event names and Messenger mappings are runtime/framework metadata spread across PHP attributes, service configuration, and the compiled container. Static container inspection recovers the final listener wiring without executing application code, while configurable attribute rules avoid hardcoding application packages. Canonical proxy ownership keeps navigation on real source classes, and synthetic event nodes preserve the standard editor Call Hierarchy experience instead of introducing a custom protocol.

Dependencies

Validation

  • focused Symfony event, Messenger, proxy, and Call Hierarchy tests
  • cargo clippy --fix --allow-dirty -- -D warnings
  • cargo fmt
  • cargo test --all-targets on the rebuilt Symfony head

@codecov-commenter

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.34039% with 633 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/code_lens.rs 87.98% 129 Missing ⚠️
src/symfony/container.rs 74.69% 104 Missing ⚠️
src/completion/symfony.rs 83.21% 93 Missing ⚠️
src/symfony/events.rs 93.54% 66 Missing ⚠️
src/indexing/watch.rs 47.78% 59 Missing ⚠️
src/rename/prepare.rs 58.57% 58 Missing ⚠️
src/proxy_metadata.rs 92.13% 25 Missing ⚠️
src/references/members.rs 94.62% 23 Missing ⚠️
src/references/dispatch.rs 74.68% 20 Missing ⚠️
src/reference_counts.rs 95.64% 18 Missing ⚠️
... and 8 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-events-messenger-intelligence branch from 69e4f02 to 2b619aa 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 added 3 commits August 30, 2026 17:41
Model publishers, events, and subscribers through standard LSP call hierarchy nodes, canonicalizing configured proxy owners before matching.
@sidux
sidux force-pushed the feat/symfony-events-messenger-intelligence branch from 2b619aa to 596c503 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