Weave Code
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

shipmonk/phpstan-rules

40 super-strict PHPStan rules from ShipMonk to close gaps even in extra-strict setups. Installs as an extension, configurable per rule (enable/disable, tweak defaults), with options like safer comparisons, enum generics checks, and more.

View on GitHub
Deep Wiki
Context7
4.3.7

Fixes:

  • forbidVariableTypeOverwriting: fix false positive with fluent $this returns (#350)
  • forbidUnusedException & forbidUnusedMatchResult support remaining edge cases like string concat (#353)
  • forbidUselessNullableReturn: fix false positive with property hooks (https://github.com/shipmonk-rnd/phpstan-rules/pull/355)
4.3.6

Fixes:

  • forbidCheckedExceptionInYieldingMethod: support functions and (immediately-invoked) closures (#345)
  • Add composer.lock to export-ignore (#344)
4.3.5

Fixes:

  • forbidCheckedExceptionInCallable: fix reported file for traits (#342)
4.3.4

Fixes:

  • No crash or false-positives when running with fibers-based PHPStan 2.1.34+ (#340, #337)
4.3.3

Fixes:

4.3.2

Fixes:

  • enforceReadonlyPublicProperty: skip untyped props + add excludePropertyWithDefaultValue option (#334, @devfrey)
4.3.1

Fixes:

enforceReadonlyPublicProperty: skip static properties (#333, @devfrey)

4.3.0

Improvements:

  • enforceReadonlyPublicProperty support asymmetric visibility (#331, @JanTvrdik)
  • forbidArithmeticOperationOnNonNumber add support for BcMath\Number (#321, @JokubasR)

Fixes:

  • enforceNativeReturnTypehint fix false positive for unions with template type (#325, @mspirkov)
  • forbidPhpDocNullabilityMismatchWithNativeTypehint: ignore void methods (#328, @mspirkov)

Dependencies:

  • phpstan/phpstan now requires ^2.1.32 (#331)
4.2.1

Fixes:

  • forbidUselessNullableReturn: no error for overridable methods (#314 by @vrana)
4.2.0

New features:

  • forbidUnusedClosureParameters: report unused trailing params for closures and array functions (#313)
4.1.5

Fixes:

  • enforceNativeReturnTypehint: fix property hook false positive (#309)
4.1.4

Fixes:

  • forbidUnusedMatchResult: fix false positive for usage in arrow function (#305, @maryo)
4.1.3

Fixes:

  • enforceReadonlyPublicProperty: fix false positive with hooked properties (#303)
4.1.2

Fixes:

  • forbidUnusedException: fix ->getException()::class false positive (#299)
4.1.1

Fixes:

  • forbidCast: fix custom blacklist configuration (#297, @forrest79)

Dependencies

  • phpstan/phpstan requires ^2.1.8 (#296)
4.1.0

New features:

  • forbidCustomFunctions now detects even fist class callables, anonymous classes and array/string callables in arguments (#288)
    • e.g. new class extends DeniedParent {}
    • e.g. $this->deniedMethod(...)
    • e.g. array_map([$this, 'deniedMethod'], $a)
    • e.g. array_map('denied_function', $a)
4.0.0

Breaking changes:

  • Dropped uselessPrivatePropertyNullability as it got implemented in native PHPStan (#283)
  • Shrunk function list in forbidEnumInFunctionArguments as most of them are detected by native PHPStan (#278)

Dependencies

  • phpstan/phpstan now requires 2.0.0 (#274)
3.2.1

Fixes:

  • Fix reflection error on unknown symbols (#273)

Dependencies:

  • phpstan/phpstan now requires 1.12.5 (was 1.11.0) (#272)
3.2.0

New features:

  • Ease enabling rules one-by-one (#260)
parameters:
    shipmonkRules:
        enableAllRules: false

        allowComparingOnlyComparableTypes:
            enabled: true
3.1.0

New features:

3.0.0

Breaking changes:

  • forbidAssignmentNotMatchingVarDoc: removed as there is better native replacement when bleedingEdge is enabled (#238)
  • allowNamedArgumentOnlyInAttributes: removed as it was highly opinionated and did not provide any extra strictness (#238)
  • forbidCheckedExceptionInCallable: removed config immediatelyCalledCallables (we now respect native [@param-immediately-invoked-callable](https://github.com/param-immediately-invoked-callable), see docs) (#240)
  • forbidReturnValueInYieldingMethod: option reportRegardlessOfReturnType is now true by default

Improvements

  • All rules accepting classnames in its config checks class existence

Dependencies

  • phpstan/phpstan now requires at least 1.11.0 (was 1.10.51)
    • 1.11.0 comes with error identifiers (which we support since 2.10.0)
2.12.0

New features

  • forbidNotNormalizedType: check invalid Parent|Child even in multi-catch and [@throws](https://github.com/throws) (#231, #232)
2.11.3

Fixes

Dependencies

  • remove nikic/php-parser requirement (#222)
    • it is bundled inside PHPStan's phar anyway
2.11.2

Fixes

  • Fix compatibility with PHPStan >=1.10.51 (#206)

Dependencies

  • phpstan/phpstan now requires at least 1.10.51 (was 1.10.30) (#206)
2.11.1

Fixes:

  • forbidEnumInFunctionArguments:
    • allow array_unique($enums, SORT_REGULAR) (#196)
    • deny also natcasesort (#197)
2.11.0

New features:

2.10.2

Fixes:

2.10.1

Fixes

  • allowComparingOnlyComparableTypes: allow safe tuple comparison (lists of equal size & item types) (#182)
    • example: usort($items, fn ($a, $b) => [$a->updatedAt, $a->id] <=> [$b->updatedAt, $b->id])
2.10.0

New features

2.9.2

Fixes

  • forbidUnusedMatchResult: fix false positive with assign operators, += etc (#171)
2.9.1

Fixes

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport