Skip to content

Releases: inpsyde/php-coding-standards

v1.0.0-beta.1

13 Apr 12:58
Compare
Choose a tag to compare

Added

  • PHPCompatibility checks
  • External VIP rules
  • Possibility to filter execution of tests

Changed

  • 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

v0.13.4

19 Feb 10:26
Compare
Choose a tag to compare

Fixed

  • Function with nullable type return and returning null (and nothing else) considered invalid.

Changed

  • Replaced abandoned "wimg/php-compatibility" with "phpcompatibility/php-compatibility".

v0.13.3

31 Jul 10:37
Compare
Choose a tag to compare

v0.13.2

31 Jul 08:26
25edfc4
Compare
Choose a tag to compare
  • Changed "squizlabs/php_codesniffer" in composer.json to "~3.2.3"

v0.13.1

21 May 17:54
Compare
Choose a tag to compare
  • Revert changed in WP rules added in 0.13.0

v0.13.0

21 May 17:43
Compare
Choose a tag to compare
  • Whitelist PHP core methods for not having return or argument type declaration.
  • Fix WordPress security rules names.

v0.12.0

15 Apr 09:59
Compare
Choose a tag to compare
  • Fix bug in Psr4Sniff when class has no 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 (See #14)
  • Allow filters callbacks to return null on purpose

v0.11.0

19 Mar 20:42
Compare
Choose a tag to compare
  • 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.

v0.10.0

26 Feb 15:13
Compare
Choose a tag to compare
  • Renamed sniffs namespace (breaking change).
    Sniff are now referenced via Inpsyde.CodeQuality... instead of InpsydeCodingStandard.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.

v0.9.0

22 Feb 12:32
Compare
Choose a tag to compare
  • ReturnTypeDeclarationSniff do no warn for missing return type when a docbloc like: @return {aType}|null exists for the function.