- Fix regression in line-length sniff
- Improvements and cleanup of various sniff and
PhpcsHelpers
- Added tests for
PhpcsHelpers
- Improvements and increased consistency in CS and doc blocks
- Improved line length calculation for inline HTML
- Added Psalm
- Added CI checks via GitHub workflows
- Allow
iterable
as return type for generators - Replace merge conflict sniff removed from upstream VIP cs
- Do not trigger warnings for long
use
statements
- Add "js" to allowed 2-chars words for "ElementMinimalLength" sniff
- Improvements to closure doc-bloc recognition
- Introduce "StaticClosure" sniff
- CS adjustments
- Replace "NestingLevel" from Generics with custom sniff (to relax checks for try / catch)
- Improved documentation
- Extended list of allowed 2-chars words for "ElementMinimalLength" sniff
- README adjustments
- Increase configuration flexibility for "NoAccessors" sniff
- Improved documentation
- CS adjustments
- Move PHPCS requirement to 3.5.0+
- PHPCompatibility checks
- External VIP rules
- Possibility to filter execution of tests
- Move to PSR-12
- Move to WPCS v2
- Move to PHPCS v3.3
- Upgrade
dealerdirect/phpcodesniffer-composer-installer
to^0.5
- Extend type declaration exclusion for hooks static closures
- Simplify customization of
ElementNameMinimalLength
- Allow blank line after method with single line declaration
- Ignore in return type declaration check all methods that start with
__
- Remove
PHPCSAliases
class - Remove configuration values in provided
ruleset.xml
- Improved README and documentation
- Fix function with nullable type return and returning null (and nothing else) considered invalid.
- Replace abandoned wimg/php-compatibility with phpcompatibility/php-compatibility.
- Fixed false positive "missing argument type declaration" when param are passed by-reference.
- Make
ReturnTypeDeclarationSniff
compatible with PHPCS 3.3
- Changed "squizlabs/php_codesniffer" in composer.json to "~3.2.3"
- Revert WordPress security rules names changed in
0.13.0
- Whitelist PHP core methods for not having return or argument type declaration.
- Fix WordPress security rules names.
- Fix bug in
Psr4Sniff
when class has not namespace. - Allow @wp-hook ignore of return type for private and protected methods.
- Only check public accessors (by default).
- Fix bug in checking return type.
- Allow filters callbacks to return
null
on purpose.
- Fix false positive in
ReturnTypeDeclarationSniff
with nullable types. - Relax check for missing return type when
{aType}|null
doc bloc is present. - Add
is
to the list of allowed short names. - Added
FunctionBodyStartSniff
to deal with blank lines on top of functions body. - Added
VariablesNameSniff
. - Improved
PhpcsHelpers::variableIsProperty()
. - Improved failure handling in FixturesTest.
- Use NeutronStandard by opting-in rules instead of opting-out.
- Properly handle Generators and return types.
- Renamed sniffs namespace (breaking change).
Sniff are now referenced via
Inpsyde.CodeQuality...
instead ofInpsydeCodingStandard.CodeQuality...
- Add
Psr4Sniff
to check PSR-4 compliance of files that contain classes auto-loadable entities. - Minor tweaks to sniff.
- Improved documentation for custom sniffs and their configuration.
ReturnTypeDeclarationSniff
do no warn for missing return type when a docbloc like:@return {aType}|null
exists for the function.
- Fix bug in
NoAccessorsSniff
and allow for a few method names related to PHP core interfaces. - Exclude
ArrayAccess
methods fromReturnTypeDeclarationSniff
andArgumentTypeDeclarationSniff
. - Fix bug in
LineLengthSniff
which affected edge cases. - Changed default
LineLengthSniff
max length to 100, excluding leading indent. - Remove Variable Analysis, too much false positives
- Fix bug in
ReturnTypeDeclarationSniff
which caused wrong return type detection.
- Exclude
NeutronStandard.MagicMethods.RiskyMagicMethod
- Add
.gitattributes
- Update own styles in
phpcs
- Removed
NeutronStandard.Conditions.DisallowConditionAssignWithoutConditional
. - Removed
NeutronStandard.MagicMethods.DisallowMagicGet
. - Removed
NeutronStandard.MagicMethods.DisallowMagicSet
. - Made
NeutronStandard.Whitespace.DisallowMultipleNewlines.MultipleNewlines
a warning not error. - Added custom
AssignmentInsideConditionSniff
sniff. - Added custom
NoTopLevelDefineSniff
sniff.
- Missing return type waring from
ReturnTypeDeclarationSniff
skipped for hook callbacks. - Fixed a bug in return counting in helper class that affected few sniffs.
- Add several "Generic" and "Squiz" rules.
- Add
DisallowShortOpenTagSniff
that extends the generic sniff allowing short echo. - Remove
NeutronStandard.Constants.DisallowDefine
because of github.com/Automattic/phpcs-neutron-standard/issues/44 - Renamed configuration properties for
FunctionLengthSniff
. - Add integration tests for custom sniffs.
- Rename
NoASetterSniff
toNoAccessorsSniff
and also warn for getters.
ArgumentTypeDeclarationSniff
also skip function and methods that declare@wp-hook
doc param.
- Disabled
NeutronStandard.Functions.TypeHint
and replaced with custom sniffs - Added
ArgumentTypeDeclarationSniff
to replaceNeutronStandard.Functions.TypeHint
sniff for missing argument types. It does not check closures used as hook callbacks (because WP cannot be trusted on types). - Added
ReturnTypeDeclarationSniff
to replaceNeutronStandard.Functions.TypeHint
sniff for missing or wrong return type. - Added
HookClosureReturnSniff
to sniff closures added to filters and missing return values and closures added to action and having return values.
- Fix a bug in
FunctionLengthSniff
which only excludes first doc block FunctionLengthSniff
also excludes (by default) blank lines and single line comments- Introduce
phpcs.xml
- Small improvements to ruleset
- Use own styles
FunctionLengthSniff
now excludes doc blocks lines from counting- New
LineLengthSniff
(that replaces "Generic" sniff included by "PSR2") and ignores long lines coming from translation functions first argument
- Rename custom rules namespace from
CodingStandard
toInpsydeCodingStandard
- Usage of PSR 1/2 as base
- Test for PHP 7+
- Introduction of phpcs-variable-analysis
- Introduction of Automattic NeutronStandard
- Only use few WordPress rules from wpcs
- Make package compatible with
phpcodesniffer-composer-installer
- Add lot of info to README
- Removed
Generic.PHP.LowerCaseConstant
, because we're going to use PSR standards. - Updated to newer version of
wp-coding-standards/wpcs
. - Updated to newer version of
squizlabs/php_codesniffer
. - Added support for PHP7+.
- Added new excludes which are too WordPressy.
- First release.