Releases: php-fig-rectified/psr2r-sniffer
1.3.2
Fixes
- Resolved problem of tab indentation breaking for certain sniffs
- Removed superfluous sniff
1.3.1
Fixes
Removed invalid sniff, added some more useful ones.
1.3.0
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) vsarray<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
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
Fixes
- Allowed phpstan-* and psalm-* tags to work.
- Fixed conflict on class opening lines
1.0.0
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
- https://github.com/slevomat/coding-standard
- https://github.com/spryker/code-sniffer
- and a few own extras for PSR2R and beyond
creating a best practice bundle of ~180 sniffs.
1.0.0-beta
Beta Release of PHP 7.2+ version (LTS)
This sniffer is now a combination of
- https://github.com/slevomat/coding-standard
- https://github.com/spryker/code-sniffer
- and a few own extras for PSR2R and beyond
creating a best practice bundle of ~180 sniffs.
0.6.4
Improvements
- Added NamespaceSpacingSniff to assert a newline before namespace statements as per PSR-12.
0.6.3
Improvements
Added some more sniffs, PSR-12 and TrailingComma.
Ruleset now ships with 127 sniffs.
0.6.2
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.