slam/phpstan-extensions
PHPStan extensions with extra strict rules: unused variables, closure parameter typehints, enforce ::class notation, forbid goto, naming conventions, validate PHPUnit annotation FQCNs, and restrict access to globals/static properties in specific contexts.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| kcs/phpstan-strict-rules | 0.92 | 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 | 41.7 | — | — | |
| korbeil/phpstan-generic-rules | 0.92 | 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 | 5 | 7K | 2 | 7.8 | 39.3 | — | 9 months ago | |
| phpstan/phpstan-strict-rules | 0.91 | Extra-strict, opinionated PHPStan rules for highly defensive, strongly typed PHP. Enforces boolean conditions, numeric operands, strict calls (e.g., in_array), detects useless casts, prevents loop variable overwrites, and requires matching switch/case types. | 704 | 713 | 62 | 3M | 38 | 46.2 | 74.5 | MIT | 2 weeks ago | |
| shipmonk/phpstan-rules | 0.91 | 40 super-strict PHPStan rules from ShipMonk to plug gaps in extra-strict setups. Install via Composer, include rules.neon, then enable/disable or tune rules per-project. Targets tricky PHP edge cases like unsafe comparisons, casts, arrays, enums and more. | 155 | 154 | 23 | 211K | 1 | 28.4 | 50.9 | MIT | 2 months ago | |
| e-lodgy/coding-standard | 0.91 | E-Lodgy’s shared Easy Coding Standard (ECS) configuration for PHP projects. Install via Composer, import the provided ecs.php, and apply consistent formatting and code style rules across your src, tests, and config files. | 0 | 0 | 1 | 5 | 1 | 2.6 | 10.7 | MIT | 2 years ago | |
| phpstan/phpstan | 0.91 | PHPStan is a static analysis tool for PHP that finds bugs without running your code. It catches whole classes of errors early, improving type safety and code correctness, and helps you spot issues before writing tests or deploying. | 14,057 | 14,126 | 958 | 10M | 1,072 | 94.7 | 73.3 | MIT | 2 days ago | |
| contributte/phpstan | 0.90 | 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 | 1K | 0 | 10.6 | 42.6 | MIT | 7 months ago | |
| swissspidy/phpstan-no-private | 0.89 | PHPStan extension that reports deprecation warnings when code uses “pseudo-private” elements marked with @access private. Helps prevent relying on internal classes, methods, functions, or properties. Easy install via Composer with optional extension-installer support. | 9 | 9 | 1 | 165K | 1 | 1.4 | 55.2 | MIT | 1 year ago | |
| wyrihaximus/phpstan-rules-wrapper | 0.89 | Composer wrapper that bundles popular PHPStan rule sets and extensions into one install. Works out of the box with phpstan/extension-installer, pulling in strict, deprecation, PHPUnit, Mockery, dead-code detection, PSR-3, and type-coverage rules. | 6 | 6 | 0 | 133K | 1 | 30.6 | 64.9 | MIT | 1 week ago | |
| ergebnis/phpstan-rules | 0.89 | A set of extra PHPStan rules to enforce stricter, opinionated code standards in PHP projects. Install via Composer and include rules.neon (auto via phpstan/extension-installer) to catch issues like named arguments, class design, and more. | 460 | 459 | 24 | 426K | 6 | 24.1 | 47.8 | MIT | 6 months ago | |
| spaze/phpstan-disallowed-calls | 0.89 | PHPStan extension to define and enforce a denylist of disallowed function and method calls in your codebase. Catch legacy, unsafe, or unwanted APIs during static analysis with configurable rules and helpful error messages. | 339 | 338 | 23 | 788K | 3 | 32.8 | 55.4 | MIT | 4 days ago | |
| symplify/phpstan-rules | 0.83 | Extra PHPStan rules by Symplify to catch bugs, improve code quality, and enforce consistent conventions. Easy to install and configure, with a broad set of checks for Symfony/Laravel and modern PHP features to keep your codebase clean. | 270 | 268 | 30 | 585K | 0 | 21.4 | 53.1 | MIT | 1 month ago | |
| symplify/phpstan-extensions | 0.83 | Extra PHPStan rules and extensions from Symplify to improve static analysis of PHP projects. Adds better type inference and framework-aware checks, helping catch bugs earlier and keep codebases consistent with minimal configuration. | 39 | 39 | 5 | 282K | 0 | 0.4 | 52.7 | MIT | — | |
| phpstan/phpstan-phpunit | 0.82 | PHPStan extension for PHPUnit: improves type inference for mocks (intersection types for createMock/getMock), understands Foo|MockObject phpDocs, adds early-terminating methods to avoid undefined vars, and refines assert() types. Optional strict rules catch improper assertion usage. | 535 | 539 | 57 | 4M | 37 | 44.2 | 79.4 | MIT | 1 month ago | |
| slam/php-cs-fixer-extensions | 0.81 | Extensions and ready-to-use rulesets for FriendsOfPHP PHP-CS-Fixer. Adds custom fixers like final_abstract_public, final_internal_class, utf8 cleanup, inline comment spacing, function reference spacing, and PHP-only proxy fixers for consistent code style. | 68 | 68 | 2 | 7K | 1 | 22.0 | 31.3 | MIT | 4 months ago | |
| sanmai/phpstan-rules | 0.80 | Extra PHPStan rules from sanmai that extend static analysis for PHP projects. Helps catch additional issues not covered by core rules, improving code quality and consistency with minimal setup. | 3 | 4 | 0 | 1K | 0 | 17.6 | 39.2 | Apache-2.0 | 5 months ago | |
| localheinz/phpstan-rules | 0.80 | Custom PHPStan rules to enforce stricter coding standards in PHP projects. Includes ready-to-use rules.neon (auto-loaded via phpstan/extension-installer) with checks like no named arguments, class final enforcement, and more. Install via Composer as a dev dependency. | 460 | 458 | 24 | 494 | 6 | 24.1 | 8.9 | MIT | 6 months ago | |
| thecodingmachine/phpstan-strict-rules | 0.80 | Extra-strict PHPStan ruleset that flags risky or inconsistent PHP patterns beyond the default checks. Helps enforce cleaner, safer code by catching edge cases and enforcing best practices, with easy opt-in configuration for existing PHPStan setups. | 289 | 290 | 27 | 51K | 7 | 32.8 | 38.3 | — | 1 month ago |
How can I help you explore Laravel packages today?