localheinz/phpstan-rules
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.
Files\NoPhpStanIgnoreRule by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/1011Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.13.0...2.13.1
phpstan/phpstan:^2.1.35 by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/1010Files\NoPhpstanIgnoreRule by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/1009Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.12.0...2.13.0
Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.11.0...2.12.0
Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.10.5...2.11.0
CallLikes\NoNamedArgumentRule to handle calls to constructors of variable class names by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/957CallLikes\NoNamedArgumentRule to describe known calls only by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/958Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.10.4...2.10.5
CallLikes\NoNamedArgumentRule to handle static calls on variable expressions by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/947CallLikes\NoNamedArgumentRule to handle calls on invokables by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/948CallLikes\NoNamedArgumentRule to handle calls on callables assigned to properties by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/950CallLikes\NoNamedArgumentRule to handle other calls with generic error message by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/951Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.10.3...2.10.4
InvokeParentHookMethodRule by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/944Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.10.2...2.10.3
Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.10.1...2.10.2
Invocation::never() by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/941never invocation by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/942Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.10.0...2.10.1
InvokeParentHookMethodRule by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/939Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.9.0...2.10.0
phpstan/phpstan:^2.1.8 by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/938NoNamedArgumentRule by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/916Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.8.0...2.9.0
allRules parameter to allow disabling and enabling all rules by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/913NoAssignByReferenceRule by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/914Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.7.0...2.8.0
NoParameterPassedByReferenceRule by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/911NoReturnByReferenceRule by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/912Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.6.1...2.7.0
nikic/php-parser by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/898Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.6.0...2.6.1
phpstan/phpstan:^2.0.0 by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/873Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.5.2...2.6.0
Analyzer by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/896null is referenced with incorrect case or relative to the root namespace by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/897Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.5.1...2.5.2
RuleError with identifier by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/882Methods\FinalInAbstractClassRule to ignore Doctrine embeddables and entities by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/396NoCompactRule to detect usages of compact() with incorrect case by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/889protected method in anonymous class by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/890protected methods declared in traits by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/894#[Before] attribute should not be private in final classes by @cosmastech in https://github.com/ergebnis/phpstan-rules/pull/863phpunit/phpunit annotations to be private by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/895Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.5.0...2.5.1
nikic/php-parser by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/878Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.4.0...2.5.0
ergebnis/php-package-template by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/869rector/rector by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/868checkMissingIterableValueType option by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/870checkGenericClassInNonGenericObjectType option by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/871Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.3.0...2.4.0
Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.2.0...2.3.0
infection/infection by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/631platform by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/671ergebnis/php-package-template by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/672ergebnis/php-package-template by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/685ergebnis/php-package-template by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/699nikic/php-parser:^5.0.0 by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/735Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.1.0...2.2.0
ergebnis/php-package-template by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/570ergebnis/php-package-template by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/605Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/2.0.0...2.1.0
~ operator to limit compatibility with PHP versions by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/507NoEmptyRule by @enumag in https://github.com/ergebnis/phpstan-rules/pull/525ergebnis/php-package-template by @localheinz in https://github.com/ergebnis/phpstan-rules/pull/539Full Changelog: https://github.com/ergebnis/phpstan-rules/compare/1.0.0...2.0.0
(v?\d+(.\d+)*)
ergebnis/php-cs-fixer-config from 2.5.1 to 2.5.2 (#298), by @dependabot[bot]actions/stale from v3.0.12 to v3.0.13 (#299), by @dependabot[bot]actions/checkout from v2.3.3 to v2.3.4 (#300), by @dependabot[bot]actions/cache from v2.1.2 to v2.1.3 (#301), by @dependabot[bot]ibiqlik/action-yamllint from v2 to v3 (#302), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.5.2 to 2.5.3 (#303), by @dependabot[bot]phpunit/phpunit from 8.5.8 to 8.5.9 (#304), by @dependabot[bot]gr2m/create-or-update-pull-request-action from v1.3.0 to v1.3.1 (#305), by @dependabot[bot]shivammathur/setup-php from 2.7.0 to 2.8.0 (#306), by @dependabot[bot]actions/github-script from v3.0.0 to v3.1 (#307), by @dependabot[bot]ergebnis/test-util from 1.3.0 to 1.4.0 (#308), by @dependabot[bot]actions/stale from v3.0.13 to v3.0.14 (#309), by @dependabot[bot]shivammathur/setup-php from 2.8.0 to 2.9.0 (#310), by @dependabot[bot]gr2m/create-or-update-pull-request-action from v1.3.1 to v1.3.3 (#311), by @dependabot[bot]phpunit/phpunit from 8.5.9 to 8.5.11 (#312), by @dependabot[bot]phpunit/phpunit from 8.5.11 to 8.5.13 (#313), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.5.3 to 2.7.0 (#314), by @dependabot[bot]ergebnis/php-library-template (#315), by @localheinzergebnis/php-cs-fixer-config from 2.7.0 to 2.8.0 (#316), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.8.0 to 2.9.0 (#317), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.9.0 to 2.10.0 (#318), by @dependabot[bot]ergebnis/composer-normalize from 2.9.0 to 2.13.0 (#319), by @dependabot[bot]ergebnis/composer-normalize from 2.13.0 to 2.13.2 (#320), by @dependabot[bot]ergebnis/php-library-template (#322), by @localheinzphpunit/phpunit from 8.5.13 to 8.5.14 (#324), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.10.0 to 2.11.0 (#325), by @dependabot[bot]actions/stale from v3.0.14 to v3.0.15 (#326), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.11.0 to 2.12.0 (#327), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.12.0 to 2.12.1 (#328), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.12.1 to 2.13.0 (#329), by @dependabot[bot]actions/cache from v2.1.3 to v2.1.4 (#330), by @dependabot[bot]actions/stale from v3.0.15 to v3.0.16 (#331), by @dependabot[bot]actions/stale from v3.0.16 to v3.0.17 (#332), by @dependabot[bot]stefanzweifel/git-auto-commit-action from v4.8.0 to v4.9.0 (#333), by @dependabot[bot]stefanzweifel/git-auto-commit-action from v4.9.0 to v4.9.1 (#334), by @dependabot[bot]shivammathur/setup-php from 2.9.0 to 2.10.0 (#335), by @dependabot[bot]stefanzweifel/git-auto-commit-action from v4.9.1 to v4.9.2 (#336), by @dependabot[bot]actions/stale from v3.0.17 to v3.0.18 (#337), by @dependabot[bot]ergebnis/composer-normalize from 2.13.2 to 2.13.3 (#338), by @dependabot[bot]phpunit/phpunit from 8.5.14 to 8.5.15 (#339), by @dependabot[bot]ergebnis/test-util from 1.4.0 to 1.5.0 (#340), by @dependabot[bot]stefanzweifel/git-auto-commit-action from v4.9.2 to v4.10.0 (#342), by @dependabot[bot]actions/cache from v2.1.4 to v2.1.5 (#341), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.13.0 to 2.13.1 (#343), by @dependabot[bot]actions/github-script from v3.1 to v4.0.2 (#345), by @dependabot[bot]shivammathur/setup-php from 2.10.0 to 2.11.0 (#346), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.13.1 to 2.14.0 (#348), by @dependabot[bot]stefanzweifel/git-auto-commit-action from 4.10.0 to 4.11.0 (#349), by @dependabot[bot]ibiqlik/action-yamllint from 3 to 3.0.1 (#350), by @dependabot[bot]actions/stale from 3.0.18 to 3.0.19 (#351), by @dependabot[bot]actions/cache from 2.1.5 to 2.1.6 (#353), by @dependabot[bot]ergebnis/composer-normalize from 2.13.3 to 2.15.0 (#356), by @dependabot[bot]phpunit/phpunit from 8.5.15 to 8.5.17 (#357), by @dependabot[bot]ibiqlik/action-yamllint from 3.0.1 to 3.0.2 (#359), by @dependabot[bot]actions/github-script from 4.0.2 to 5 (#373), by @dependabot[bot]actions/github-script from 4.1 to 5 (#376), by @dependabot[bot]actions/stale from 3.0.19 to 4 (#361), by @dependabot[bot]ibiqlik/action-yamllint from 3.0.2 to 3.0.4 (#367), by @dependabot[bot]stefanzweifel/git-auto-commit-action from 4.11.0 to 4.12.0 (#370), by @dependabot[bot]shivammathur/setup-php from 2.11.0 to 2.14.0 (#371), by @dependabot[bot]phpunit/phpunit from 8.5.17 to 8.5.21 (#374), by @dependabot[bot]shivammathur/setup-php from 2.14.0 to 2.15.0 (#377), by @dependabot[bot]ibiqlik/action-yamllint from 3.0.4 to 3.1 (#378), by @dependabot[bot]actions/checkout from 2.3.4 to 2.3.5 (#380), by @dependabot[bot]actions/checkout from 2.3.5 to 2.4.0 (#382), by @dependabot[bot]1.0 (#381), by @rpkamp.php_cs to .php-cs-fixer.php (#383), by @localheinz--generate-baseline option for generating baseline for phpstan/phpstan (#386), by @localheinzvimeo/psalm (#385), by @localheinzphpstan/phpstan and vimeo/psalm (#387), by @localheinznette/di from 3.0.1 to 3.0.11 (#389), by @dependabot[bot]Xdebug instead of pcov for collecting code coverage (#391), by @localheinzfriendsofphp/php-cs-fixer on fixtures (#358), by @localheinz8.0 (#323), by @localheinzClasses\FinalRule to inspect attributes (#395), by @localheinzergebnis/test-util from 1.0.0 to 1.1.0 (#263), by @dependabot[bot]ergebnis/composer-normalize from 2.7.1 to 2.8.1 (#264), by @dependabot[bot]ergebnis/license from 1.0.0 to 1.1.0 (#266), by @dependabot[bot]psalm/plugin-phpunit from 0.11.0 to 0.12.1 (#267), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.2.1 to 2.2.2 (#265), by @dependabot[bot]vimeo/psalm from 3.14.2 to 3.15 (#268), by @dependabot[bot]shivammathur/setup-php from 2.4.3 to 2.5.0 (#269), by @dependabot[bot]actions/stale from v3.0.10 to v3.0.11 (#270), by @dependabot[bot]actions/create-release from v1.1.3 to v1.1.4 (#271), by @dependabot[bot]gr2m/create-or-update-pull-request-action from v1.2.10 to v1.3.0 (#273), by @dependabot[bot]ergebnis/composer-normalize from 2.8.1 to 2.8.2 (#274), by @dependabot[bot]actions/checkout from v2.3.2 to v2.3.3 (#275), by @dependabot[bot]psalm/plugin-phpunit from 0.12.1 to 0.12.2 (#276), by @dependabot[bot]ergebnis/test-util from 1.1.0 to 1.2.0 (#277), by @dependabot[bot]shivammathur/setup-php from 2.5.0 to 2.6.0 (#278), by @dependabot[bot]ergebnis/test-util from 1.2.0 to 1.3.0 (#279), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.2.2 to 2.3.0 (#280), by @dependabot[bot]actions/cache from v2.1.1 to v2.1.2 (#281), by @dependabot[bot]actions/stale from v3.0.11 to v3.0.12 (#282), by @dependabot[bot]vimeo/psalm from 3.15 to 3.17.2 (#284), by @dependabot[bot]shivammathur/setup-php from 2.6.0 to 2.7.0 (#286), by @dependabot[bot]vimeo/psalm from 3.17.2 to 3.18.0 (#287), by @dependabot[bot]vimeo/psalm from 3.18.0 to 3.18.2 (#288), by @dependabot[bot]ergebnis/composer-normalize from 2.8.2 to 2.9.0 (#289), by @dependabot[bot]ibiqlik/action-yamllint from v1.0.0 to v2 (#291), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.3.0 to 2.4.0 (#290), by @dependabot[bot]ergebnis/php-library-template (#292), by @localheinzergebnis/php-cs-fixer-config from 2.4.0 to 2.5.1 (#293), by @dependabot[bot]actions/create-release from v1.1.1 to v1.1.2 (#250), by @dependabot[bot]actions/checkout from v2.3.1 to v2.3.2 (#251), by @dependabot[bot]actions/create-release from v1.1.2 to v1.1.3 (#252), by @dependabot[bot]ergebnis/composer-normalize from 2.6.1 to 2.7.0 (#253), by @dependabot[bot]vimeo/psalm from 3.13.1 to 3.14.1 (#254), by @dependabot[bot]ergebnis/composer-normalize from 2.7.0 to 2.7.1 (#255), by @dependabot[bot]vimeo/psalm from 3.14.1 to 3.14.2 (#256), by @dependabot[bot]psalm/plugin-phpunit from 0.10.1 to 0.11.0 (#258), by @dependabot[bot]actions/github-script from v2 to v3 (#257), by @dependabot[bot]infection/infection from 0.13.6 to 0.15.3 (#260), by @dependabot[bot]phpunit/phpunit from 7.5.20 to 8.5.8 (#261), by @dependabot[bot]ergebnis/php-library-template (#262), by @localheinzvimeo/psalm from 3.11.2 to 3.11.4 (#226), by @dependabot-preview[bot]psalm/plugin-phpunit from 0.10.0 to 0.10.1 (#227), by @dependabot-preview[bot]vimeo/psalm from 3.11.4 to 3.11.5 (#228), by @dependabot-preview[bot]main as default branch name (#229), by @localheinzergebnis/php-library-template (#231), by @localheinzactions/create-release from v1 to v1.1.1 (#235), by @dependabot[bot]actions/checkout from v2 to v2.3.0 (#236), by @dependabot[bot]vimeo/psalm from 3.11.5 to 3.11.6 (#238), by @dependabot[bot]vimeo/psalm from 3.11.6 to 3.12.1 (#240), by @dependabot[bot]ergebnis/php-cs-fixer-config from 2.1.2 to 2.2.0 (#241), by @dependabot[bot]actions/checkout from v2.3.0 to v2.3.1 (#239), by @dependabot[bot]ergebnis/php-library-template (#242), by @localheinzergebnis/php-cs-fixer-config from 2.2.0 to 2.2.1 (#243), by @dependabot[bot]vimeo/psalm from 3.12.1 to 3.12.2 (#244), by @dependabot[bot]ergebnis/composer-normalize from 2.5.1 to 2.6.1 (#246), by @dependabot[bot]vimeo/psalm from 3.12.2 to 3.13.1 (#249), by @dependabot[bot]ergebnis/composer-normalize from 2.3.0 to 2.3.2 (#204), by @dependabot-preview[bot]vimeo/psalm from 3.9.5 to 3.10.1 (#207), by @dependabot-preview[bot]psalm/plugin-phpunit from 0.9.0 to 0.9.1 (#208), by @dependabot-preview[bot]psalm/plugin-phpunit from 0.9.1 to 0.9.2 (#209), by @dependabot-preview[bot]psalm/plugin-phpunit from 0.9.2 to 0.10.0 (#210), by @dependabot-preview[bot]ergebnis/php-cs-fixer-config from 2.1.0 to 2.1.1 (#211), by @dependabot-preview[bot]ergebnis/php-library-template (#212), by @localheinzvimeo/psalm from 3.10.1 to 3.11.0 (#213), by @dependabot-preview[bot]vimeo/psalm from 3.11.0 to 3.11.1 (#214), by @dependabot-preview[bot]ergebnis/php-library-template (#216), by @localheinzvimeo/psalm from 3.11.1 to 3.11.2 (#215), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.3.2 to 2.4.0 (#219), by @dependabot-preview[bot]ergebnis/php-cs-fixer-config from 2.1.1 to 2.1.2 (#217), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.4.0 to 2.5.0 (#220), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.5.0 to 2.5.1 (#221), by @dependabot-preview[bot]ergebnis/license from 0.1.0 to 1.0.0 (#222), by @dependabot-preview[bot]ergebnis/php-library-template (#223), by @localheinzClasses\PHPUnit\Framework\TestCaseWithSuffixRule (#225), by @localheinzpsalm/plugin-phpunit from 0.8.1 to 0.9.0 (#190), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.2.2 to 2.2.3 (#191), by @dependabot-preview[bot]vimeo/psalm from 3.8.3 to 3.9.3 (#194), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.2.3 to 2.2.4 (#195), by @dependabot-preview[bot]ergebnis/php-cs-fixer-config from 2.0.0 to 2.1.0 (#197), by @dependabot-preview[bot]vimeo/psalm from 3.9.3 to 3.9.4 (#198), by @dependabot-preview[bot]vimeo/psalm from 3.9.4 to 3.9.5 (#199), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.2.4 to 2.3.0 (#200), by @dependabot-preview[bot]ergebnis/test-util from 0.9.1 to 1.0.0 (#201), by @dependabot-preview[bot]ORM\Mapping\Entity annotations in FinalRule (#202), by @localheinzergebnis/php-library-template (#203), by @localheinzergebnis/composer-normalize from 1.3.1 to 2.0.2 (#168), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.0.2 to 2.1.0 (#169), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.1.0 to 2.1.1 (#170), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.1.1 to 2.1.2 (#171), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.1.2 to 2.2.0 (#172), by @dependabot-preview[bot]ergebnis/php-library-template (#174), by @localheinzergebnis/php-library-template (#176), by @localheinzphpunit/phpunit from 7.5.18 to 7.5.19 (#175), by @dependabot-preview[bot]localheinz/composer-require-checker-action (#177), by @localheinzvimeo/psalm from 3.8.1 to 3.8.2 (#178), by @dependabot-preview[bot]phpunit/phpunit from 7.5.19 to 7.5.20 (#179), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.2.0 to 2.2.1 (#180), by @dependabot-preview[bot]psalm/plugin-phpunit from 0.8.0 to 0.8.1 (#181), by @dependabot-preview[bot]ergebnis/composer-normalize from 2.2.1 to 2.2.2 (#182), by @dependabot-preview[bot]vimeo/psalm from 3.8.2 to 3.8.3 (#183), by @dependabot-preview[bot]ergebnis/php-library-template (#184), by @localheinzergebnis/php-cs-fixer-config from 1.1.3 to 2.0.0 (#185), by @dependabot-preview[bot]ergebnis/php-library-template (#187), by @localheinzHow can I help you explore Laravel packages today?