PEAR News | PHP News | Manuals | Imprint

PEAR-News ::



PHP_CodeSniffer 1.5.0RC2

- Ruleset processing has been rewritten to be more predictable<br />
-- Provides much better support for relative paths inside ruleset files<br />
-- May mean that sniffs that were previously ignored are now being included when importing external rulesets<br />
-- Ruleset processing output can be seen by using the -vv command line argument<br />
-- Internal sniff registering functions have all changed, so please review custom scripts<br />
- You can now pass multiple coding standards on the command line, comma separated (request #19144)<br />
-- Works with built-in or custom standards and rulesets, or a mix of both<br />
- You can now exclude directories or whole standards in a ruleset XML file (request #19731)<br />
-- e.g., exclude "Generic.Commenting" or just "Generic"<br />
-- You can also pass in a path to a directory instead, if you know it<br />
- Added Generic LowerCaseKeywordSniff to ensure all PHP keywords are defined in lowercase<br />
-- The PSR2 and Squiz standards now use this sniff<br />
- Added Generic SAPIUsageSniff to ensure the PHP_SAPI constant is used instead of php_sapi_name() (request #19863)<br />
- Squiz FunctionSpacingSniff now has a setting to specify how many lines there should between functions (request #19843)<br />
-- Default remains at 2<br />
-- Override the "spacing" setting in a ruleset.xml file to change<br />
- Squiz LowercasePHPFunctionSniff no longer throws errors for the limited set of PHP keywords it was checking<br />
-- Add a rule for Generic.PHP.LowerCaseKeyword to your ruleset to replicate this functionality<br />
- Added support for the PHP 5.4 T_CALLABLE token so it can be used in lower PHP versions<br />
- Generic EndFileNoNewlineSniff now supports checking of CSS and JS files<br />
- PSR2 SwitchDeclarationSniff now has a setting to specify how many spaces code should be indented<br />
-- Default remains at 4; override the indent setting in a ruleset.xml file to change<br />
-- Thanks to Asher Snyder for the patch<br />
- Generic ScopeIndentSniff now has a setting to specify a list of tokens that should be ignored<br />
-- The first token on the line is checked and the whole line is ignored if the token is in the array<br />
-- Thanks to Eloy Lafuente for the patch<br />
- Squiz LowercaseClassKeywordsSniff now checks for the TRAIT keyword<br />
-- Thanks to Anthon Pang for the patch<br />
- If you create your own PHP_CodeSniffer object, PHPCS will no longer exit when an unknown argument is found<br />
-- This allows you to create wrapper scripts for PHPCS more easily<br />
- PSR2 MethodDeclarationSniff no longer generates a notice for methods named "_"<br />
-- Thanks to Bart S for the patch<br />
- Squiz BlockCommentSniff no longer reports that a blank line between a scope closer and block comment is invalid<br />
- Generic DuplicateClassNameSniff no longer reports an invalid error if multiple PHP open tags exist in a file<br />
- Generic DuplicateClassNameSniff no longer reports duplicate errors if multiple PHP open tags exist in a file<br />
- Fixed bug #19819 : Freeze with syntax error in use statement<br />
- Fixed bug #19820 : Wrong message level in Generic_Sniffs_CodeAnalysis_EmptyStatementSniff<br />
- Fixed bug #19859 : CodeSniffer::setIgnorePatterns API changed<br />
- Fixed bug #19871 : findExtendedClassName doesn't return FQCN on namespaced classes<br />
- Fixed bug #19879 : bitwise and operator interpreted as reference by value
[ more >> ]


PHP_CodeSniffer 1.4.5

- Added Generic LowerCaseKeywordSniff to ensure all PHP keywords are defined in lowercase<br />
-- The PSR2 and Squiz standards now use this sniff<br />
- Added Generic SAPIUsageSniff to ensure the PHP_SAPI constant is used instead of php_sapi_name() (request #19863)<br />
- Squiz FunctionSpacingSniff now has a setting to specify how many lines there should between functions (request #19843)<br />
-- Default remains at 2<br />
-- Override the "spacing" setting in a ruleset.xml file to change<br />
- Squiz LowercasePHPFunctionSniff no longer throws errors for the limited set of PHP keywords it was checking<br />
-- Add a rule for Generic.PHP.LowerCaseKeyword to your ruleset to replicate this functionality<br />
- Added support for the PHP 5.4 T_CALLABLE token so it can be used in lower PHP versions<br />
- Generic EndFileNoNewlineSniff now supports checking of CSS and JS files<br />
- PSR2 SwitchDeclarationSniff now has a setting to specify how many spaces code should be indented<br />
-- Default remains at 4; override the indent setting in a ruleset.xml file to change<br />
-- Thanks to Asher Snyder for the patch<br />
- Generic ScopeIndentSniff now has a setting to specify a list of tokens that should be ignored<br />
-- The first token on the line is checked and the whole line is ignored if the token is in the array<br />
-- Thanks to Eloy Lafuente for the patch<br />
- Squiz LowercaseClassKeywordsSniff now checks for the TRAIT keyword<br />
-- Thanks to Anthon Pang for the patch<br />
- If you create your own PHP_CodeSniffer object, PHPCS will no longer exit when an unknown argument is found<br />
-- This allows you to create wrapper scripts for PHPCS more easily<br />
- PSR2 MethodDeclarationSniff no longer generates a notice for methods named "_"<br />
-- Thanks to Bart S for the patch<br />
- Squiz BlockCommentSniff no longer reports that a blank line between a scope closer and block comment is invalid<br />
- Generic DuplicateClassNameSniff no longer reports an invalid error if multiple PHP open tags exist in a file<br />
- Generic DuplicateClassNameSniff no longer reports duplicate errors if multiple PHP open tags exist in a file<br />
- Fixed bug #19819 : Freeze with syntax error in use statement<br />
- Fixed bug #19820 : Wrong message level in Generic_Sniffs_CodeAnalysis_EmptyStatementSniff<br />
- Fixed bug #19859 : CodeSniffer::setIgnorePatterns API changed<br />
- Fixed bug #19871 : findExtendedClassName doesn't return FQCN on namespaced classes<br />
- Fixed bug #19879 : bitwise and operator interpreted as reference by value
[ more >> ]


PHP_CodeSniffer 1.5.0RC1

- Reports have been completely rewritten to consume far less memory<br />
-- Each report is incrementally written to the file system during a run and then printed out when the run ends<br />
-- There is no longer a need to keep the list of errors and warnings in memory during a run<br />
- Multi-file sniff support has been removed because they are too memory intensive<br />
-- If you have a custom multi-file sniff, you can convert it into a standard sniff quite easily<br />
-- See CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php for an example
[ more >> ]


PHP_CodeSniffer 1.4.4

- Ignored lines no longer cause the summary report to show incorrect error and warning counts<br />
-- Thanks to Bert Van Hauwaert for the patch<br />
- Added Generic CSSLintSniff to run CSSLint over a CSS file and report warnings<br />
-- Set full command to run CSSLint using phpcs --config-set csslint_path /path/to/csslint<br />
-- Thanks to Roman Levishchenko for the contribution<br />
- Added PSR2 ControlStructureSpacingSniff to ensure there are no spaces before and after parenthesis in control structures<br />
-- Fixes bug #19732 : PSR2: some control structures errors not reported<br />
- Squiz commenting sniffs now support non-English characters when checking for capital letters<br />
-- Thanks to Roman Levishchenko for the patch<br />
- Generic EndFileNewlineSniff now supports JS and CSS files<br />
-- Thanks to Denis Ryabkov for the patch<br />
- PSR1 SideEffectsSniff no longer reports constant declarations as side effects<br />
- Notifysend report now supports notify-send versions before 0.7.3<br />
-- Thanks to Ken Guest for the patch<br />
- PEAR and Squiz FunctionCommentSniffs no longer report errors for misaligned argument comments when they are blank<br />
-- Thanks to Thomas Peterson for the patch<br />
- Squiz FunctionDeclarationArgumentSpacingSniff now works correctly for equalsSpacing values greater than 0<br />
-- Thanks to Klaus Purer for the patch<br />
- Squiz SuperfluousWhitespaceSniff no longer throws errors for CSS files with no newline at the end<br />
- Squiz SuperfluousWhitespaceSniff now allows a single newline at the end of JS and CSS files<br />
- Fixed bug #19755 : Token of T_CLASS type has no scope_opener and scope_closer keys<br />
- Fixed bug #19759 : Squiz.PHP.NonExecutableCode fails for return function()...<br />
- Fixed bug #19763 : Use statements for traits not recognised correctly for PSR2 code style<br />
- Fixed bug #19764 : Instead of for traits throws uppercase constant name errors<br />
- Fixed bug #19772 : PSR2_Sniffs_Namespaces_UseDeclarationSniff does not properly recognize last use<br />
- Fixed bug #19775 : False positive in NonExecutableCode sniff when not using curly braces<br />
- Fixed bug #19782 : Invalid found size functions in loop when using object operator<br />
- Fixed bug #19799 : config folder is not created automatically<br />
- Fixed bug #19804 : JS Tokenizer wrong /**/ parsing
[ more >> ]


PHP_CodeSniffer 1.4.3

- Added support for the PHP 5.5 T_FINALLY token to detect try/catch/finally statements<br />
- Added empty CodeSniffer.conf to enable config settings for Composer installs<br />
- Added Generic EndFileNoNewlineSniff to ensure there is no newline at the end of a file<br />
- Autoloader can now load PSR-0 compliant classes<br />
-- Thanks to Maik Penz for the patch<br />
- Squiz NonExecutableCodeSniff no longer throws error for multi-line RETURNs inside CASE statements<br />
-- Thanks to Marc Ypes for the patch<br />
- Squiz OperatorSpacingSniff no longer reports errors for negative numbers inside inline THEN statements<br />
-- Thanks to Klaus Purer for the patch<br />
- Squiz OperatorSpacingSniff no longer reports errors for the assignment of operations involving negative numbers<br />
- Squiz SelfMemberReferenceSniff can no longer get into an infinite loop when checking a static call with a namespace<br />
-- Thanks to Andy Grunwald for the patch<br />
- Fixed bug #19699 : Generic.Files.LineLength giving false positives when tab-width is used<br />
- Fixed bug #19726 : Wrong number of spaces expected after instanceof static<br />
- Fixed bug #19727 : PSR2: no error reported when using } elseif {
[ more >> ]


PHP_CodeSniffer 1.4.2

- PHP_CodeSniffer can now be installed using Composer<br />
-- Require squizlabs/php_codesniffer in your composer.json file<br />
-- Thanks to Rob Bast, Stephen Rees-Carter, Stefano Kowalke and Ivan Habunek for help with this<br />
- Squiz BlockCommentSniff and InlineCommentSniff no longer report errors for trait block comments<br />
- Squiz SelfMemberReferenceSniff now supports namespaces<br />
-- Thanks to Andy Grunwald for the patch<br />
- Squiz FileCommentSniff now uses tag names inside the error codes for many messages<br />
-- This allows you to exclude specific missing, out of order etc., tags<br />
- Squiz SuperfluousWhitespaceSniff now has an option to ignore blank lines<br />
-- This will stop errors being reported for lines that contain only whitespace<br />
-- Set the ignoreBlankLines property to TRUE in your ruleset.xml file to enable this<br />
- PSR2 no longer reports errors for whitespace at the end of blank lines<br />
- Fixed gitblame report not working on Windows<br />
-- Thanks to Rogerio Prado de Jesus<br />
- Fixed an incorrect error in Squiz OperatorSpacingSniff for default values inside a closure definition<br />
- Fixed bug #19691 : SubversionPropertiesSniff fails to find missing properties<br />
-- Thanks to Kevin Winahradsky for the patch<br />
- Fixed bug #19692 : DisallowMultipleAssignments is triggered by a closure<br />
- Fixed bug #19693 : exclude-patterns no longer work on specific messages<br />
- Fixed bug #19694 : Squiz.PHP.LowercasePHPFunctions incorrectly matches return by ref functions
[ more >> ]


PHP_CodeSniffer 1.4.1

- All ignore patterns have been reverted to being checked against the absolute path of a file<br />
-- Patterns can be specified to be relative in a rulset.xml file, but nowhere else<br />
-- e.g., [exclude-pattern type="relative"]^tests/*[/exclude-pattern] (with angle brackets, not square brackets)<br />
- Added support for PHP tokenizing of T_INLINE_ELSE colons, so this token type is now available<br />
-- Custom sniffs that rely on looking for T_COLON tokens inside inline if statements must be changed to use the new token<br />
-- Fixes bug #19666 : PSR1.Files.SideEffects throws a notice Undefined index: scope_closer<br />
- Messages can now be changed from errors to warnings (and vice versa) inside ruleset.xml files<br />
-- As you would with "message" and "severity", specify a "type" tag under a "rule" tag and set the value to "error" or "warning"<br />
- PHP_CodeSniffer will now generate a warning on files that it detects have mixed line endings<br />
-- This warning has the code Internal.LineEndings.Mixed and can be overriden in a ruleset.xml file<br />
-- Thanks to Vit Brunner for help with this<br />
- Sniffs inside PHP 5.3 namespaces are now supported, along with the existing underscore-style emulated namespaces<br />
-- For example: namespace MyStandard\Sniffs\Arrays; class ArrayDeclarationSniff implements \PHP_CodeSniffer_Sniff { ...<br />
-- Thanks to Till Klampaeckel for the patch<br />
- Generic DuplicateClassNameSniff is no longer a multi-file sniff, so it won't max out your memory<br />
-- Multi-file sniff support should be considered deprecated as standard sniffs can now do the same thing<br />
- Added Generic DisallowSpaceIndent to check that files are indented using tabs<br />
- Added Generic OneClassPerFileSniff to check that only one class is defined in each file<br />
-- Thanks to Andy Grunwald for the contribution<br />
- Added Generic OneInterfacePerFileSniff to check that only one interface is defined in each file<br />
-- Thanks to Andy Grunwald for the contribution<br />
- Added Generic LowercasedFilenameSniff to check that filenames are lowercase<br />
-- Thanks to Andy Grunwald for the contribution<br />
- Added Generic ClosingPHPTagSniff to check that each open PHP tag has a corresponding close tag<br />
-- Thanks to Andy Grunwald for the contribution<br />
- Added Generic CharacterBeforePHPOpeningTagSniff to check that the open PHP tag is the first content in a file<br />
-- Thanks to Andy Grunwald for the contribution<br />
- Fixed incorrect errors in Squiz OperatorBracketSniff and OperatorSpacingSniff for negative numbers in CASE statements<br />
-- Thanks to Arnout Boks for the patch<br />
- Generic CamelCapsFunctionNameSniff no longer enforces exact case matching for PHP magic methods<br />
- Generic CamelCapsFunctionNameSniff no longer throws errors for overridden SOAPClient methods prefixed with double underscores<br />
-- Thanks to Dorian Villet for the patch<br />
- PEAR ValidFunctionNameSniff now supports traits<br />
- PSR1 ClassDeclarationSniff no longer throws an error for non-namespaced code if PHP version is less than 5.3.0<br />
- Fixed bug #19616 : Nested switches cause false error in PSR2<br />
- Fixed bug #19629 : PSR2 error for inline comments on multi-line argument lists<br />
- Fixed bug #19644 : Alternative syntax, e.g. if/endif triggers Inline Control Structure error<br />
- Fixed bug #19655 : Closures reporting as multi-line when they are not<br />
- Fixed bug #19675 : Improper indent of nested anonymous function bodies in a call<br />
- Fixed bug #19685 : PSR2 catch-22 with empty third statement in for loop<br />
- Fixed bug #19687 : Anonymous functions inside arrays marked as indented incorrectly in PSR2
[ more >> ]


PHP_CodeSniffer 1.4.0

- Added PSR1 and PSR2 coding standards that can be used to check your code against these guidelines<br />
- PHP 5.4 short array syntax is now detected and tokens are assigned to the open and close characters<br />
-- New tokens are T_OPEN_SHORT_ARRAY and T_CLOSE_SHORT_ARRAY as PHP does not define its own<br />
- Added the ability to explain a coding standard by listing the sniffs that it includes<br />
-- The sniff list includes all imported and native sniffs<br />
-- Explain a standard by using the -e and --standard=[standard] command line arguments<br />
-- E.g., phpcs -e --standard=Squiz<br />
-- Thanks to Ben Selby for the idea<br />
- Added report to show results using notify-send<br />
-- Use --report=notifysend to generate the report<br />
-- Thanks to Christian Weiske for the contribution<br />
- The JS tokenizer now recognises RETURN as a valid closer for CASE and DEFAULT inside switch statements<br />
- AbstractPatternSniff now sets the ignoreComments option using a public var rather than through the constructor<br />
-- This allows the setting to be overwritten in ruleset.xml files<br />
-- Old method remains for backwards compatibility<br />
- Generic LowerCaseConstantSniff and UpperCaseConstantSniff no longer report errors on classes named True, False or Null<br />
- PEAR ValidFunctionNameSniff no longer enforces exact case matching for PHP magic methods<br />
- Squiz SwitchDeclarationSniff now allows RETURN statements to close a CASE or DEFAULT statement<br />
- Squiz BlockCommentSniff now correctly reports an error for blank lines before blocks at the start of a control structure<br />
- Fixed a PHP notice generated when loading custom array settings from a rulset.xml file<br />
- Fixed bug #17908 : CodeSniffer does not recognise optional @params<br />
-- Thanks to Pete Walker for the patch<br />
- Fixed bug #19538 : Function indentation code sniffer checks inside short arrays<br />
- Fixed bug #19565 : Non-Executable Code Sniff Broken for Case Statements with both return and break<br />
- Fixed bug #19612 : Invalid @package suggestion
[ more >> ]


PHP_CodeSniffer 1.3.6

- Memory usage has been dramatically reduced when using the summary report<br />
-- Reduced memory is only available when displaying a single summary report to the screen<br />
-- PHP_CodeSniffer will not generate any messages in this case, storing only error counts instead<br />
-- Impact is most notable with very high error and warning counts<br />
- Significantly improved the performance of Squiz NonExecutableCodeSniff<br />
- Ignore patterns now check the relative path of a file based on the dir being checked<br />
-- Allows ignore patterns to become more generic as the path to the code is no longer included when checking<br />
-- Thanks to Kristof Coomans for the patch<br />
- Sniff settings can now be changed by specifying a special comment format inside a file<br />
-- e.g., // @codingStandardsChangeSetting PEAR.Functions.FunctionCallSignature allowMultipleArguments false<br />
-- If you change a setting, don't forget to change it back<br />
- Added Generic EndFileNewlineSniff to ensure PHP files end with a newline character<br />
- PEAR FunctionCallSignatureSniff now includes a setting to force one argument per line in multi-line calls<br />
-- Set allowMultipleArguments to false<br />
- Squiz standard now enforces one argument per line in multi-line function calls<br />
- Squiz FunctionDeclarationArgumentSpacingSniff now supports closures<br />
- Squiz OperatorSpacingSniff no longer throws an error for negative values inside an inline THEN statement<br />
-- Thanks to Klaus Purer for the patch<br />
- Squiz FunctionCommentSniff now throws an error for not closing a comment with */<br />
-- Thanks to Klaus Purer for the patch<br />
- Summary report no longer shows two lines of PHP_Timer output when showing sources<br />
- Fixed undefined variable error in PEAR FunctionCallSignatureSniff for lines with no indent<br />
- Fixed bug #19502 : Generic.Files.LineEndingsSniff fails if no new-lines in file<br />
- Fixed bug #19508 : switch+return: Closing brace indented incorrectly<br />
- Fixed bug #19532 : The PSR-2 standard don't recognize Null in class names<br />
- Fixed bug #19546 : Error thrown for __call() method in traits
[ more >> ]


PHP_CodeSniffer 1.3.5

- Added Generic CamelCapsFunctionNameSniff to just check if function and method names use camel caps<br />
-- Does not allow underscore prefixes for private/protected methods<br />
-- Defaults to strict checking, where two uppercase characters can not be next to each other<br />
-- Strict checking can be disabled in a ruleset.xml file<br />
- Squiz FunctionDeclarationArgumentSpacing now has a setting to specify how many spaces should surround equals signs<br />
-- Default remains at 0<br />
-- Override the equalsSpacing setting in a ruleset.xml file to change<br />
- Squiz ClassDeclarationSniff now throws errors for > 1 space before extends/implements class name with ns seperator<br />
- Squiz standard now warns about deprecated functions using Generic DeprecatedFunctionsSniff<br />
- PEAR FunctionDeclarationSniff now reports an error for multiple spaces after the FUNCTION keyword and around USE<br />
- PEAR FunctionDeclarationSniff now supports closures<br />
- Squiz MultiLineFunctionDeclarationSniff now supports closures<br />
- Exclude rules written for Unix systems will now work correctly on Windows<br />
-- Thanks to Walter Tamboer for the patch<br />
- The PHP tokenizer now recognises T_RETURN as a valid closer for T_CASE and T_DEFAULT inside switch statements<br />
- Fixed duplicate message codes in Generic OpeningFunctionBraceKernighanRitchieSniff<br />
- Fixed bug #18651 : PHPunit Test cases for custom standards are not working on Windows<br />
- Fixed bug #19416 : Shorthand arrays cause bracket spacing errors<br />
- Fixed bug #19421 : phpcs doesn't recognize ${x} as equivalent to $x<br />
- Fixed bug #19428 : PHPCS Report "hgblame" doesn't support windows paths<br />
-- Thanks to Justin Rovang for the patch<br />
- Fixed bug #19448 : Problem with detecting remote standards<br />
- Fixed bug #19463 : Anonymous functions incorrectly being flagged by NonExecutableCodeSniff<br />
- Fixed bug #19469 : PHP_CodeSniffer_File::getMemberProperties() sets wrong scope<br />
- Fixed bug #19471 : phpcs on Windows, when using Zend standard, doesn't catch problems<br />
-- Thanks to Ivan Habunek for the patch<br />
- Fixed bug #19478 : Incorrect indent detection in PEAR standard<br />
-- Thanks to Shane Auckland for the patch<br />
- Fixed bug #19483 : Blame Reports fail with space in directory name
[ more >> ]



© 2004 I.S.U.M.