Skip to content

Resolve Laravel connection names through typed receivers - #525

Open
shuvroroy wants to merge 2 commits into
PHPantom-dev:mainfrom
shuvroroy:feat/laravel-typed-connection-names
Open

shuvroroy wants to merge 2 commits into
PHPantom-dev:mainfrom
shuvroroy:feat/laravel-typed-connection-names

Conversation

@shuvroroy

Copy link
Copy Markdown
Contributor

Typed calls such as $database->connection('mysql') now use the receiver's type to select the correct config file. Connection names in instance calls and model or job $connection properties receive completion, hover, navigation, diagnostics, and references, just like direct facade calls.

The implementation uses the shared type engine and config reference identity, including database role suffixes. It adds 12 integration tests and Laravel examples with runtime assertions, updates the changelog, and removes the completed L56 backlog item.

Validation also uncovered a parser gap affecting unfinished anonymous-model defaults, two macOS fixture path mismatches, and an extra Laravel demo diagnostic. These are corrected in the same commit.

Local validation:

  • Full Rust suite with LLVM coverage: 18,899 passed, 4 ignored, no failures.
  • Changed executable Rust line coverage: 100% (342/342).
  • Clippy with warnings denied, including all targets, semantic export, and WASI; formatting checks passed.
  • Semantic-export tests and doctests passed.
  • PHP lint and runtime assertions passed for the plain PHP and framework playgrounds. Framework analysis reports no errors for Symfony, Yii, and WordPress, and exactly the three documented Laravel demo errors.

Checklist

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, examples/)
  • I have updated the config schema (config-schema.json) — not applicable
  • I have added/updated tests to cover my changes
  • If I used AI tools, I have reviewed what they produced and can explain the changes and why they are needed.
  • I have read through any AI-generated text, especially documentation, the changelog, and other user-facing content, and removed or corrected anything inaccurate, unclear, or unnecessary.

Use the shared type engine to select database, queue, or broadcasting
connection names for instance calls and model or job connection properties.
Provide completion, hover, definition, diagnostics, and references through
the same config identity used by direct facade calls.

Handle nullable and narrowed receivers, Queueable traits, named arguments,
and unfinished property defaults. Include top-level anonymous classes in
the parser used for recovery so nested anonymous model defaults complete.

Add twelve integration tests, Laravel demos and runtime assertions, update
the changelog, and remove the completed L56 backlog item. Canonicalize two
macOS test fixture paths and restore the documented Laravel demo diagnostic
baseline found during full-suite validation.

Validation: 18,899 Rust tests passed; 342/342 changed executable Rust lines
covered. Clippy, formatting, semantic-export tests, doctests, PHP lint and
runtime assertions, and framework diagnostic baselines passed.
@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

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AJenbo AJenbo modified the milestones: Sprint 8, Sprint 9 Nov 6, 2026

This branch has not been deployed

No deployments
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