Skip to content

Releases: php-fig-rectified/psr2r-sniffer

1.3.2

15 Nov 17:59
Compare
Choose a tag to compare

Fixes

  • Resolved problem of tab indentation breaking for certain sniffs
  • Removed superfluous sniff

1.3.1

08 Nov 15:25
Compare
Choose a tag to compare

Fixes

Removed invalid sniff, added some more useful ones.

1.3.0

01 Nov 19:09
Compare
Choose a tag to compare

Improvements

Generics syntax instead of legacy array syntax

The old string[] syntax is deprecated and replaced by generics, as it can now also focus on key instead of just value:

  • array<string> (list) vs array<string, string> (assoc array)
  • It is recommended not to upgrade object collections outside of \ArrayObject and \ArrayAccess etc, as IDEs do not yet understand those. Here we can keep \MyCollection|\MyObject[] as legacy typehint in place. Custom @phpstan-* tags on top can be "clean" already.

PHP 7.3+

With PHP 7.3 being already EOL soon, it only makes sense to drop the already very long EOL 7.2 version.
It is already PHP 8.1 tested, however, as well.

More quality sniffs

Quite a few more sniffs to make sure the code is also semantically checked even before any static analyzer like PHPStan/Psalm look at it.

1.2.0

19 Oct 18:07
Compare
Choose a tag to compare

Improvements

Upgrade to new slevomat/coding-standard v7

Previous releases were a bit wonky (1.1.0 was released on a wrong branch it seems), please use this one moving forward.

1.0.1

13 Nov 09:49
a59b5da
Compare
Choose a tag to compare

Fixes

  • Allowed phpstan-* and psalm-* tags to work.
  • Fixed conflict on class opening lines

1.0.0

26 Jun 18:52
641222f
Compare
Choose a tag to compare

Release of PHP 7.2+ version (LTS)

Note: This version recommends changing code as per PHP 7.2+.
If your code needs to run also on lower versions, please use the previous version and the corresponding ^0.6 constraint here.

This sniffer is now a combination of

creating a best practice bundle of ~180 sniffs.

1.0.0-beta

19 Apr 00:10
Compare
Choose a tag to compare

Beta Release of PHP 7.2+ version (LTS)

This sniffer is now a combination of

creating a best practice bundle of ~180 sniffs.

0.6.4

18 Apr 04:25
Compare
Choose a tag to compare

Improvements

  • Added NamespaceSpacingSniff to assert a newline before namespace statements as per PSR-12.

0.6.3

21 Nov 22:54
Compare
Choose a tag to compare

Improvements

Added some more sniffs, PSR-12 and TrailingComma.
Ruleset now ships with 127 sniffs.

0.6.2

28 Sep 15:31
Compare
Choose a tag to compare

Improvements

  • Use more PSR2 and low-level sniffs.
  • Add Empty Doc Block sniff

This ruleset now ships with 124 sniffs.

Bugfixes

  • Fixed InlineDocBlock sniff around return statements and short variable less annotation (@return {type}).
  • Fixed FCQN sniff around iterable type and (x|y)[] mixed array type.