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.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| pekral/phpstan-rules | 0.88 | Custom PHPStan rules from pekral that extend static analysis for Laravel and PHP projects, helping catch bugs, enforce coding standards, and improve code quality with additional checks you can drop into your existing PHPStan setup. | 0 | — | 0 | — | 1 | 4.5 | — | MIT | 9 months ago |
|
| calebdw/phpstan-laravel | 0.87 | A PHPStan extension for Laravel that teaches static analysis about Laravel’s magic, including facades, helpers, Eloquent models, and container bindings, reducing false positives and surfacing more accurate type errors in Laravel apps. | 35 | 35 | 7 | 12K | 0 | 20.4 | 40.9 | MIT | 5 days ago | |
| larastan/larastan | 0.87 | Larastan is a PHPStan extension for Laravel that adds static typing and catches whole classes of bugs before you write tests. It boots your application's container to resolve types only computable at runtime while supporting Laravel's magic. | 6,547 | 6,560 | 529 | 11M | 39 | 85.8 | 78.7 | MIT | 3 days ago | |
| spaze/phpstan-disallowed-calls | 0.87 | PHPStan rules to detect disallowed functions, methods, constants, namespaces, attributes, variables, and properties without running code. Catch leftover debug calls like var_dump() and enforce custom logging or API usage in production. | 346 | 341 | 23 | 807K | 3 | 32.4 | 54.7 | MIT | 3 weeks ago | |
| sidz/phpstan-rules | 0.87 | sidz/phpstan-rules adds extra PHPStan rules for catching magic numbers in comparisons, assignments, function arguments, and arithmetic. Install via Composer and configure ignored numbers, numeric strings, and rule exclusions. | 30 | 31 | 4 | 29K | 0 | 23.1 | 47.7 | MIT | 1 month ago | |
| phpstan/php-8-stubs | 0.87 | Stub files for PHP 8 built-in functions, classes, and extensions, maintained for PHPStan. Improves static analysis and type inference by providing accurate signatures and phpDoc where native reflection is incomplete or inconsistent. | 31 | 31 | 12 | 333K | 3 | 30.2 | 65.5 | MIT | 1 week ago | |
| soyhuce/phpstan-extension | 0.87 | A PHPStan extension from Soyhuce that adds custom rules and type extensions for Laravel and PHP projects, helping teams catch bugs earlier and improve static analysis accuracy in CI and local development. | 1 | — | 1 | — | 0 | 0.9 | 1.5 | MIT | 1 year ago | |
| rector/type-perfect | 0.86 | Type Perfect adds 10 PHPStan rules to tighten type declarations: replace empty/isset checks with instanceof for precise narrowing, prefer explicit getters over magic array access, and enforce interface signatures. Easy to enable even on legacy code; improves reliability fast. | 105 | 105 | 7 | 403K | 0 | 10.5 | 43.6 | MIT | 3 months ago | |
| nunomaduro/larastan | 0.86 | Larastan is a PHPStan extension for Laravel that adds static typing and catches bugs before you write tests. It understands Laravel's magic and boots your app container to resolve runtime types, supporting Laravel 9 through 11+. | 6,547 | 6,561 | 529 | 454K | 39 | 85.5 | 57.3 | MIT | 3 days ago | |
| canvural/larastan-strict-rules | 0.86 | Extra strict, opinionated PHPStan rules for Laravel. Install via Composer, include rules.neon, and enable or disable checks like no dynamic where, no facades, no global helpers, and no validation in controllers. | 91 | 90 | 7 | 26K | 0 | 27.1 | 39.2 | MIT | 2 months ago | |
| canvural/phpstan-blade-rule | 0.86 | A PHPStan rule for Laravel Blade templates that brings static analysis to your views. Catch undefined variables, type mismatches, and other errors in .blade.php files before runtime by analyzing compiled templates with PHPStan. | 56 | 56 | 4 | 142 | 3 | 1.5 | 8.2 | MIT | 4 years ago | |
| script-development/phpstan-warroom-rules | 0.86 | Custom PHPStan rules for Laravel projects that catch script-development conventions and common pitfalls. Drop-in config, clear error messages, and fast static analysis for CI pipelines. | 0 | 0 | 0 | 4K | 2 | 19.1 | 58.5 | MIT | 1 month ago | |
| wyrihaximus/phpstan-rules-wrapper | 0.86 | WyriHaximus PHPStan Rules Wrapper bundles popular PHPStan rulesets—ergebnis, strict, deprecation, PHPUnit, Mockery, ShipMonk, Symplify, PSR-3 and more—into one Composer package. Install it and, thanks to phpstan/extension-installer, the included rules work out of the box. | 6 | 6 | 0 | 133K | 1 | 31.8 | 64.9 | MIT | 6 days ago | |
| korbeil/phpstan-generic-rules | 0.86 | PHPStan extension that enforces and improves the use of PHP generics. Adds custom rules to catch missing or incorrect template types, invalid generic usages, and helps keep docblocks and type hints consistent for safer, more accurate static analysis. | 12 | 12 | 4 | 6K | 2 | 3.9 | 36.6 | — | 1 year ago | |
| kcs/phpstan-strict-rules | 0.86 | Fork of thecodingmachine/phpstan-strict-rules to support PHPStan v2. Adds stricter best-practice rules beyond core PHPStan, especially around exception handling (avoid throwing base Exception, empty catches, proper rethrowing). | 3 | 3 | 0 | 4K | 0 | 0.0 | 42.1 | — | — | |
| rector/phpstan-rules | 0.85 | PHPStan rules for Rector projects that catch common mistakes in Rector rules and configuration, helping you keep automated refactorings safer and more consistent. Use these ready-made checks to validate custom rules and configs before they rewrite your codebase. Ideal for teams maintaining custom Re... | 0 | 13 | — | 118 | — | 0.0 | 28.7 | — | — | |
| orrison/meliorstan | 0.85 | Meliorstan is a Laravel-focused PHPStan companion that simplifies static analysis setup with sensible presets and helpful rules, so teams can catch bugs earlier, enforce coding consistency, and keep applications safer with less configuration. | 20 | 20 | 0 | 6K | 1 | 19.3 | 39.5 | MIT | 3 weeks ago | |
| mll-lab/laravel-utils | 0.85 | A compact set of practical utilities for Laravel applications, providing reusable helpers and conveniences that cut boilerplate and simplify common development tasks. Easy to install and integrate into existing Laravel projects. Lightweight, dependable building blocks for everyday Laravel developmen... | 6 | — | 3 | — | 0 | 15.0 | — | MIT | 3 months ago | |
| nunomaduro/laravel-code-analyse | 0.85 | Laravel Code Analyse brings static code analysis to your Laravel apps. Run the artisan command to scan your codebase against configurable checks, catch common issues early, and keep your code clean, consistent, and production-ready. | 6,548 | 6,548 | 529 | 187 | 39 | 74.7 | 28.6 | MIT | 3 days ago | |
| contributte/phpstan | 0.85 | Contributte PHPStan integration for Nette projects. Install via Composer and get a ready-to-use PHPStan setup tailored for Nette 3.3+ on PHP 8.2+, with docs and ongoing maintenance by the Contributte team. | 1 | 2 | 2 | 24K | 0 | 4.8 | 56.9 | MIT | 10 months ago |
How can I help you explore Laravel packages today?