Skip to content

feat(laravel): add named rate limiter intelligence - #523

Open
shuvroroy wants to merge 3 commits into
PHPantom-dev:mainfrom
shuvroroy:feat/laravel-rate-limiter-names
Open

shuvroroy wants to merge 3 commits into
PHPantom-dev:mainfrom
shuvroroy:feat/laravel-rate-limiter-names

Conversation

@shuvroroy

Copy link
Copy Markdown
Contributor

Adds completion, hover, go-to-definition, and unknown-name diagnostics for Laravel rate limiters (L58). Names registered with RateLimiter::for() are available in throttle:name middleware and new RateLimited('name').

Registrations are cached from application and package service providers and their helpers without booting the application. Numeric inline limits remain values, and unreadable sources or dynamic registration names keep diagnostics open. Provider edits refresh the names.

Includes regression tests, Laravel demos and runtime assertions, a changelog entry, and removal of the completed backlog item. Also normalizes macOS test fixture paths and keeps the middleware demo within the documented three-error diagnostic baseline.

Validation

  • Full Rust suite: 18,911 passed, using the optimized test profile on macOS; doctests and semantic-export tests also passed.
  • 100% changed executable Rust line coverage: 369/369, measured with cargo llvm-cov against main.
  • Clippy passed for all targets, semantic-export, and WASI; formatting passed.
  • PHP playground lints and runtime assertions passed. Laravel analysis reports the expected three intentional errors; Symfony, Yii, and WordPress report no errors.
  • Benchmark sharding helper tests passed.

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; no configuration changes.
  • 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.

Discover rate limiter registrations from service providers and their helpers.
Complete, navigate, hover, and validate names in throttle middleware and
RateLimited constructors, keeping incomplete registration sets open.

Add regression tests and Laravel runtime examples, update the changelog,
and remove the completed backlog item. Normalize macOS test paths and
keep the middleware demo within the documented diagnostic baseline.

Validation: full Rust suite, doctests, semantic-export, clippy for all
native targets and WASI, formatting, PHP lints and runtime assertions,
framework analysis, and benchmark sharding helper tests.
Changed executable Rust line coverage: 100% (369/369).
@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 added this to the Sprint 8 milestone 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