Skip to content

1.1.0

Compare
Choose a tag to compare
@moorscode moorscode released this 18 Dec 09:16
· 676 commits to develop since this release
9172d2e

Added

  • PHPCS: New Yoast.Commenting.CodeCoverageIgnoreDeprecated sniff.
    This sniff verifies that functions which have a @deprecated tag in the function docblock, also have a @codeCoverageIgnore tag in the same docblock.
  • PHPCS: Added XSD schema tags to the ruleset.
  • Composer: requirement of the DealerDirect Composer PHPCS plugin at version ^0.5.0.
    This means that - in most cases - projects which require(-dev) YoastCS, will no longer need to have the plugin in their own composer.json and will still get the benefit of it.
  • Travis: Validation of the ruleset against the PHPCS XSD schema.
  • Travis: Testing of the code against PHP 7.3.

Changed

  • PHPCS: The Yoast.Files.TestDoubles sniff now allows setting multiple valid paths for test doubles to be placed in.
    To this end, the public doubles_path property has been changed from a string to an array.
  • Composer: Supported version of PHP_CodeSniffer has been changed from ^3.3.1 to ^3.3.2.
  • Composer: Supported version of WordPressCS has been changed from ^1.0.0 to ^1.2.0.
  • Composer: Supported version of PHPCompatibilityWP has been changed from ^1.0.0 to ^2.0.0, which uses PHPCompatibility ^9.0.0 under the hood.
  • Composer: The config-set script for use with this repo has been renamed to config-yoastcs to be in line with the same script in other repos.
  • Minor housekeeping: updated .gitignore.

Removed

Fixed

  • PHPCS: Various fixes to the Yoast.Files.TestDoubles sniff.
    • If the basepath contained a trailing slash, the sniff could give incorrect results.
    • Prevent the sniff from recognizing a path like /tests/doublesniff as correct when /test/doubles is in the allowed list.
    • The OneObjectPerFile check will now check both code above the detected mock/double class as well as code below it.