Skip to content

Releases: shipmonk-rnd/phpstan-rules

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)

2.12.0

03 Apr 09:57
db342d8
Compare
Choose a tag to compare

New features

2.11.3

05 Mar 12:12
9123cee
Compare
Choose a tag to compare

Fixes

Dependencies

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

2.11.2

10 Jan 21:23
567f9b8
Compare
Choose a tag to compare

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

22 Dec 11:54
3c286ce
Compare
Choose a tag to compare

Fixes:

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

2.11.0

19 Dec 11:38
103bad2
Compare
Choose a tag to compare

New features:

2.10.2

12 Dec 15:50
d5ec924
Compare
Choose a tag to compare

Fixes:

  • forbidUnusedMatchResult: fix void false positive in latest PHPStan (>= 1.10.49) (#189)

2.10.1

06 Dec 14:41
0c102ce
Compare
Choose a tag to compare

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

29 Nov 12:52
101c85d
Compare
Choose a tag to compare

New features

2.9.2

04 Oct 13:49
dd0c725
Compare
Choose a tag to compare

Fixes

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