Skip to content

Releases: thecodingmachine/phpstan-safe-rule

v1.4.0

11 Feb 12:58
Compare
Choose a tag to compare

What's Changed (tl;dr)

  • Drop support for EOL'ed PHP versions - 8.1 is the new minimum
  • Fix "unsafe function" error ID code
  • Port phpstan's special-case support for preg_match so that it also applies to Safe\preg_match (ie, the $matches array is now accurately typed to match the regex pattern used, rather than being a generic ?array)

What's Changed (Full)

  • flag this rule as compatible with thecodingmachine/safe v3 by @shish in #39
  • fix error identifier by @shish in #41
  • add composer test command by @shish in #42
  • drop support for long-dead php versions by @shish in #44
  • Type hints for Safe\preg_match, fixes #40 by @shish in #43
  • enable formatting in tests/ by @shish in #45
  • additional magic for preg_match, fixes #46 by @shish in #47
  • consistently use phpstan's testing framework to test phpstan bits by @shish in #48
  • More formatting by @shish in #50
  • Require safe ^1.2 by @shish in #51
  • Bump phpunit to be less-deprecated by @shish in #49

New Contributors

  • @shish made their first contribution in #39

Full Changelog: v1.3.1...v1.4.0

v1.3.1

11 Feb 12:43
Compare
Choose a tag to compare

Same as v1.3.0, but marked compatible with Safe v3.0.0

v1.3.0

31 Dec 15:08
5b4522c
Compare
Choose a tag to compare

What's Changed

This new release brings support for PHPStan 2.0 (and drops support for PHPStan 1.0)

New Contributors

Full Changelog: v1.2.0...v1.3.0

v1.2.0

17 Jan 10:13
8a7b88e
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.1.0...v1.2.0

v1.1.0

17 Nov 11:23
71bd8c1
Compare
Choose a tag to compare

Improvements

v1.0.1

30 Aug 11:42
1a1ae26
Compare
Choose a tag to compare

Changes:

v1.0.0

02 Jan 15:00
Compare
Choose a tag to compare

New feature:

  • detects usage of "new DateTime" and "new DateTimeImmutable" and proposes using the Safe variant of those classes instead.

v1.0.0-beta1

04 Dec 09:58
8694a69
Compare
Choose a tag to compare

This new version:

  • targets Safe 1.0.0-beta1
  • is compatible with PHPStan 0.12 (while keeping compatibility with 0.10 and 0.11)

v0.1.4

15 Jul 07:36
70bfb67
Compare
Choose a tag to compare

Improvements:

  • #11 #13 Add support for phpstan/extension-installer (thanks to @shadowhand)
  • #12 Ignore json_decode and json_encode when use JSON_THROW_ON_ERROR option (thanks to @vkill)

Adding special type support for preg_replace

07 Mar 13:53
00f4845
Compare
Choose a tag to compare