Skip to content

feat(php): map transparent proxies to real classes - #395

Open
sidux wants to merge 10 commits into
PHPantom-dev:mainfrom
sidux:feat/php-transparent-proxy-metadata
Open

feat(php): map transparent proxies to real classes#395
sidux wants to merge 10 commits into
PHPantom-dev:mainfrom
sidux:feat/php-transparent-proxy-metadata

Conversation

@sidux

@sidux sidux commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Why

Generated runtime proxies often appear in configuration while their useful declarations live on the parent class. Navigating into cache artifacts is noisy, and treating proxy and real names as unrelated splits references and member metadata. The mapping must stay opt-in and generic because proxy layouts and marker contracts vary by package.

Summary

  • add configurable proxy paths and marker-interface rules
  • parse generated proxy metadata statically without loading or executing cache files
  • map resource navigation, class references, member references, and declaration lenses back to the real class
  • rebuild affected resource symbol maps when proxy configuration or generated files change

Dependency

Validation

  • cargo clippy --all-targets -- -D warnings
  • cargo test: 14,117 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 91.97501% with 167 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/code_lens.rs 85.67% 49 Missing ⚠️
src/indexing/watch.rs 37.25% 32 Missing ⚠️
src/proxy_metadata.rs 93.39% 21 Missing ⚠️
src/reference_counts.rs 95.64% 18 Missing ⚠️
src/resource_navigation.rs 94.05% 17 Missing ⚠️
src/references/members.rs 93.95% 13 Missing ⚠️
src/definition/implementation.rs 93.52% 9 Missing ⚠️
src/reference_index.rs 94.95% 6 Missing ⚠️
src/definition/member/mod.rs 95.45% 1 Missing ⚠️
src/indexing/preload.rs 98.68% 1 Missing ⚠️

📢 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/php-transparent-proxy-metadata branch from d1d9871 to 1ee7d8d Compare August 30, 2026 15:33
sidux added 3 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.
Discover opt-in generated subclasses by path and marker interface, then canonicalize external metadata without changing PHP type resolution.
@sidux
sidux force-pushed the feat/php-transparent-proxy-metadata branch from 1ee7d8d to 4b6ed79 Compare August 30, 2026 15:54
@AJenbo AJenbo added this to the Sprint 7 milestone Sep 8, 2026
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