Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phpstan Rules Laravel Package

esfahanahan/phpstan-rules

A collection of custom PHPStan rules for Laravel and PHP projects, helping teams catch architectural and coding issues early. Drop it into your phpstan.neon config to enforce stricter static analysis and keep code quality consistent across the codebase.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Adopt as a CI/code-review guardrail for Laravel/Eloquent relationship-loading hygiene, especially where teams use load() on constrained parent relations.
  • v1.1.0 expands static-analysis coverage by flagging load() calls that reload a constrained parent relation, helping prevent redundant queries and subtle relationship-loading regressions.
  • Supports roadmap decisions around performance hardening, legacy refactoring, and “shift-left” database-query checks before code reaches production.
  • Build vs. buy: favor this package over custom Laravel AST/static-analysis rules unless the team already has a bespoke static-analysis platform.
  • Use cases: PR checks, Laravel performance audits, refactoring legacy eager-loading paths, onboarding engineers to Eloquent pitfalls, and preventing repeat misuse of load().

When to Consider This Package

  • Consider it when the application is Laravel/PHP, uses Eloquent relationships heavily, and has load() calls on constrained relations.
  • Strong fit when the team already runs static analysis or linting in CI and wants low-runtime-overhead guardrails.
  • Useful when relationship-loading mistakes are recurring in code review or suspected in performance issues.
  • Verify compatibility with the app’s Laravel/PHP versions, package maintenance activity, documentation, and CI integration before adoption.
  • Look elsewhere if the codebase is not Laravel/Eloquent, if the primary need is runtime query profiling/observability rather than static checks, or if the package is unmaintained or lacks clear integration guidance.

How to Pitch It (Stakeholders)

This is a low-risk engineering-quality tool that catches a narrow but costly class of Laravel relationship-loading mistakes before they reach production. v1.1.0 improves coverage by reporting load() calls that reload constrained parent relations, which can create redundant database work and make performance issues harder to spot.

For executives: it is a small investment in code quality and application performance, not a product-facing feature. For engineering: it adds a practical CI/review guardrail that reduces manual review burden and helps keep Eloquent relationship loading predictable as the codebase grows. A pilot in CI on high-traffic or relationship-heavy areas would validate value quickly.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core