Skip to content

Releases: shipmonk-rnd/phpstan-rules

4.1.4

28 May 14:54
69059a5
Compare
Choose a tag to compare

Fixes:

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

4.1.3

21 May 11:13
879bcdc
Compare
Choose a tag to compare

Fixes:

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

4.1.2

07 May 07:48
7517d6e
Compare
Choose a tag to compare

Fixes:

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

4.1.1

12 Mar 08:27
bf6c463
Compare
Choose a tag to compare

Fixes:

Dependencies

  • phpstan/phpstan requires ^2.1.8 (#296)

4.1.0

03 Dec 12:31
2f645b7
Compare
Choose a tag to compare

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

11 Nov 12:11
09c002a
Compare
Choose a tag to compare

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

01 Oct 14:36
c91fead
Compare
Choose a tag to compare

Fixes:

  • Fix reflection error on unknown symbols (#273)

Dependencies:

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

3.2.0

26 Aug 07:25
e0f9fe9
Compare
Choose a tag to compare

New features:

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

        allowComparingOnlyComparableTypes:
            enabled: true

3.1.0

11 Jul 08:37
8ace7ea
Compare
Choose a tag to compare

New features:

3.0.0

15 May 08:33
af1a026
Compare
Choose a tag to compare

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, 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)