Skip to content

2.0.0RC4

Pre-release
Pre-release
Compare
Choose a tag to compare
@gsherwood gsherwood released this 06 Nov 21:21
· 4539 commits to master since this release
  • JS tokenizer now detects xor statements correctly
  • Improved detection of properties and objects in the JS tokenizer
  • Generic ScopeIndentSniff can now fix indents using tabs instead of spaces
    • Set the tabIndent property to TRUE in your ruleset.xml file to enable this
    • It is important to also set a tab-width setting, either in the ruleset or on the command line, for accuracy
  • Generic ScopeIndentSniff now checks and auto-fixes JS files
  • Generic DisallowSpaceIndentSniff is now able to replace space indents with tab indents during fixing
  • Support for phpcs-only and phpcbf-only attributes has been added to all ruleset.xml elements
    • Allows parts of the ruleset to only apply when using a specific tool
    • Useful for doing things like excluding indent fixes but still reporting indent errors
  • Unit tests can now set command line arguments during a test run
    • Override getCliValues() and pass an array of CLI arguments for each file being tested
  • File-wide sniff properties can now be set using T_INLINE_HTML content during unit test runs
    • Sniffs that start checking at the open tag can only, normally, have properties set using a ruleset
  • Generic ConstructorNameSniff no longer errors for PHP4 style constructors when __construct() is present
    • Thanks to Thibaud Fabre for the patch
  • Generic DocCommentSniff now checks that the end comment tag is on a new line
  • Generic MultipleStatementAlignmentSniff no longer skips assignments for closures
  • Squiz DocCommentAlignment sniff now has better checking for single line doc block
  • Running unit tests with the -v CLI argument no longer generates PHP errors
  • Fixed bug #295 : ScopeIndentSniff hangs when processing nested closures
  • Fixed bug #298 : False positive in ScopeIndentSniff when anonymous functions are used with method chaining
  • Fixed bug #302 : Fixing code in Squiz InlineComment sniff can remove some comment text
  • Fixed bug #303 : Open and close tag on same line can cause a PHP notice checking scope indent
  • Fixed bug #306 : File containing only a namespace declaration raises undefined index notice
  • Fixed bug #307 : Conditional breaks in case statements get incorrect indentions
  • Fixed bug #308 : Squiz InlineIfDeclarationSniff fails on ternary operators inside closure
  • Fixed bug #310 : Variadics not recognized by tokenizer