[ANNOUNCEMENT] PHP_CodeSniffer-2.0.0RC4 (beta) Released.
[email protected] ("PEAR Announce") Thu, 6 Nov 2014 22:24:40 +0000 (GMT)
| Newsgroups | php.pear.general |
|---|---|
| Message-ID | <[email protected]> |
The new PEAR package PHP_CodeSniffer-2.0.0RC4 (beta) has been released at http://pear.php.net/.
Release notes
-------------
- 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
Package Info
------------
PHP_CodeSniffer is a PHP5 script that tokenises PHP, JavaScript and CSS files to detect violations of a defined coding standard. It is an essential development tool that ensures your code remains clean and consistent. It can also help prevent some common semantic errors made by developers.
Related Links
-------------
Package home: http://pear.php.net/package/PHP_CodeSniffer
Changelog: http://pear.php.net/package/PHP_CodeSniffer/download/2.0.0RC4
Download: http://download.pear.php.net/package/PHP_CodeSniffer-2.0.0RC4.tgz
Authors
-------
Greg Sherwood (lead)