@@ -14,8 +14,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
14
14
15
15
<active >yes</active >
16
16
</lead >
17
- <date >2018-09-24 </date >
18
- <time >09:07 :00</time >
17
+ <date >2018-12-20 </date >
18
+ <time >10:54 :00</time >
19
19
<version >
20
20
<release >3.4.0</release >
21
21
<api >3.4.0</api >
@@ -27,10 +27,10 @@ http://pear.php.net/dtd/package-2.0.xsd">
27
27
<license uri =" https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt" >BSD 3-Clause License</license >
28
28
<notes >
29
29
- The Generic.Formatting.NoSpaceAfterCast sniff has been deprecated and will be removed in version 4
30
- -- The functionality of this sniff is now available in the Generic.Formatting.SpaceAfterCast sniff
31
- --- Include the Generic.Formatting.SpaceAfterCast sniff and set the "spacing" property to "0"
32
- -- As soon as possible, replace all instances of the old sniff code with the new sniff code and property setting
33
- --- The existing sniff will continue to work until version 4 has been released
30
+ -- The functionality of this sniff is now available in the Generic.Formatting.SpaceAfterCast sniff
31
+ --- Include the Generic.Formatting.SpaceAfterCast sniff and set the "spacing" property to "0"
32
+ -- As soon as possible, replace all instances of the old sniff code with the new sniff code and property setting
33
+ --- The existing sniff will continue to work until version 4 has been released
34
34
35
35
- Rule include patterns in a ruleset.xml file are now evaluated as OR instead of AND
36
36
-- Previously, a file had to match every include pattern and no exclude patterns to be included
@@ -1906,6 +1906,184 @@ http://pear.php.net/dtd/package-2.0.xsd">
1906
1906
</filelist >
1907
1907
</phprelease >
1908
1908
<changelog >
1909
+ <release >
1910
+ <version >
1911
+ <release >3.4.0</release >
1912
+ <api >3.4.0</api >
1913
+ </version >
1914
+ <stability >
1915
+ <release >stable</release >
1916
+ <api >stable</api >
1917
+ </stability >
1918
+ <date >2018-12-20</date >
1919
+ <license uri =" https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt" >BSD License</license >
1920
+ <notes >
1921
+ - The Generic.Formatting.NoSpaceAfterCast sniff has been deprecated and will be removed in version 4
1922
+ -- The functionality of this sniff is now available in the Generic.Formatting.SpaceAfterCast sniff
1923
+ --- Include the Generic.Formatting.SpaceAfterCast sniff and set the "spacing" property to "0"
1924
+ -- As soon as possible, replace all instances of the old sniff code with the new sniff code and property setting
1925
+ --- The existing sniff will continue to work until version 4 has been released
1926
+
1927
+ - Rule include patterns in a ruleset.xml file are now evaluated as OR instead of AND
1928
+ -- Previously, a file had to match every include pattern and no exclude patterns to be included
1929
+ -- Now, a file must match at least one include pattern and no exclude patterns to be included
1930
+ -- This is a bug fix as include patterns are already documented to work this way
1931
+ - New token T_BITWISE_NOT added for the bitwise not operator
1932
+ -- This token was previously tokenized as T_NONE
1933
+ -- Any sniffs specifically looking for T_NONE tokens with a tilde as the contents must now also look for T_BITWISE_NOT
1934
+ -- Sniffs can continue looking for T_NONE as well as T_BITWISE_NOT to support older PHP_CodeSniffer versions
1935
+ - All types of binary casting are now tokenzied as T_BINARY_CAST
1936
+ -- Previously, the 'b' in 'b"some string with $var"' would be a T_BINARY_CAST, but only when the string contained a var
1937
+ -- This change ensures the 'b' is always tokenized as T_BINARY_CAST
1938
+ -- This change also converts '(binary)' from T_STRING_CAST to T_BINARY_CAST
1939
+ -- Thanks to Juliette Reinders Folmer for the help with this patch
1940
+ - Array properties set inside a ruleset.xml file can now extend a previous value instead of always overwriting it
1941
+ -- e.g., if you include a ruleset that defines forbidden functions, can you now add to that list instead of having to redefine it
1942
+ -- To use this feature, add extends="true" to the property tag
1943
+ --- e.g., property name="forbiddenFunctionNames" type="array" extend="true"
1944
+ -- Thanks to Michael Moravec for the patch
1945
+ - If $XDG_CACHE_HOME is set and points to a valid directory, it will be used for caching instead of the system temp directory
1946
+ - PHPCBF now disables parallel running if you are passing content on STDIN
1947
+ -- Stops an error from being shown after the fixed output is printed
1948
+ - The progress report now shows files with tokenizer errors as skipped (S) instead of a warning (W)
1949
+ -- The tokenizer error is still displayed in reports as normal
1950
+ -- Thanks to Juliette Reinders Folmer for the patch
1951
+ - The Squiz standard now ensures there is no space between an increment/decrement operator and its variable
1952
+ - The File::getMethodParamaters() method now includes a has_body array index in the return value
1953
+ -- TRUE if the method has no body (as with abstract and interface methods) or FALSe otherwise
1954
+ -- Thanks to Chris Wilkinson for the patch
1955
+ - The File::getTokensAsString() method now throws an exception if the $start param is invalid
1956
+ -- If the $length param is invalid, an empty string will be returned
1957
+ -- Stops an infinite loop when the function is passed invalid data
1958
+ -- Thanks to Juliette Reinders Folmer for the patch
1959
+ - Added new Generic.CodeAnalysis.EmptyPHPStatement sniff
1960
+ -- Warns when it finds empty PHP open/close tag combinations or superfluous semicolons
1961
+ -- Thanks to Juliette Reinders Folmer for the contribution
1962
+ - Added new Generic.Formatting.SpaceBeforeCast sniff
1963
+ -- Ensures there is exactly 1 space before a type cast, unless the cast statement is indented or mutli-line
1964
+ -- Thanks to Juliette Reinders Folmer for the contribution
1965
+ - Added new Generic.VersionControl.GitMergeConflict sniff
1966
+ -- Detects merge conflict artifacts left in files
1967
+ -- Thanks to Juliette Reinders Folmer for the contribution
1968
+ - Added Generic.WhiteSpace.IncrementDecrementSpacing sniff
1969
+ -- Ensures there is no space between the operator and the variable it applies to
1970
+ -- Thanks to Juliette Reinders Folmer for the contribution
1971
+ - Added PSR12.Functions.NullableTypeDeclaration sniff
1972
+ -- Ensures there is no space after the question mark in a nullable type declaration
1973
+ -- Thanks to Timo Schinkel for the contribution
1974
+ - A number of sniffs have improved support for methods in anonymous classes
1975
+ -- These sniffs would often throw the same error twice for functions in nested classes
1976
+ -- Error messages have also been changed to be less confusing
1977
+ -- The full list of affected sniffs is:
1978
+ --- Generic.NamingConventions.CamelCapsFunctionName
1979
+ --- PEAR.NamingConventions.ValidFunctionName
1980
+ --- PSR1.Methods.CamelCapsMethodName
1981
+ --- PSR2.Methods.MethodDeclaration
1982
+ --- Squiz.Scope.MethodScope
1983
+ --- Squiz.Scope.StaticThisUsage
1984
+ -- Thanks to Juliette Reinders Folmer for the patch
1985
+ - Generic.CodeAnalysis.UnusedFunctionParameter now only skips functions with empty bodies when the class implements an interface
1986
+ -- Thanks to Juliette Reinders Folmer for the patch
1987
+ - Generic.CodeAnalysis.UnusedFunctionParameter now has additional error codes to indicate where unused params were found
1988
+ -- The new error code prefixes are:
1989
+ --- FoundInExtendedClass: when the class extends another
1990
+ --- FoundInImplementedInterface: when the class implements an interface
1991
+ --- Found: used in all other cases, including closures
1992
+ -- The new error code suffixes are:
1993
+ --- BeforeLastUsed: the unused param was positioned before the last used param in the function signature
1994
+ --- AfterLastUsed: the unused param was positioned after the last used param in the function signature
1995
+ -- This makes the new error code list for this sniff:
1996
+ --- Found
1997
+ --- FoundBeforeLastUsed
1998
+ --- FoundAfterLastUsed
1999
+ --- FoundInExtendedClass
2000
+ --- FoundInExtendedClassBeforeLastUsed
2001
+ --- FoundInExtendedClassAfterLastUsed
2002
+ --- FoundInImplementedInterface
2003
+ --- FoundInImplementedInterfaceBeforeLastUsed
2004
+ --- FoundInImplementedInterfaceAfterLastUsed
2005
+ -- These errors code make it easier for specific cases to be ignored or promoted using a ruleset.xml file
2006
+ -- Thanks to Juliette Reinders Folmer for the contribution
2007
+ - Generic.Classes.DuplicateClassName now inspects traits for duplicate names as well as classes and interfaces
2008
+ -- Thanks to Chris Wilkinson for the patch
2009
+ - Generic.Files.InlineHTML now ignores a BOM at the start of the file
2010
+ -- Thanks to Chris Wilkinson for the patch
2011
+ - Generic.PHP.CharacterBeforePHPOpeningTag now ignores a BOM at the start of the file
2012
+ -- Thanks to Chris Wilkinson for the patch
2013
+ - Generic.Formatting.SpaceAfterCast now has a setting to specify how many spaces are required after a type cast
2014
+ -- Default remains 1
2015
+ -- Override the "spacing" setting in a ruleset.xml file to change
2016
+ -- Thanks to Juliette Reinders Folmer for the patch
2017
+ - Generic.Formatting.SpaceAfterCast now has a setting to ignore newline characters after a type cast
2018
+ -- Default remains FALSE, so newlines are not allowed
2019
+ -- Override the "ignoreNewlines" setting in a ruleset.xml file to change
2020
+ -- Thanks to Juliette Reinders Folmer for the patch
2021
+ - Generic.Formatting.SpaceAfterNot now has a setting to specify how many spaces are required after a NOT operator
2022
+ -- Default remains 1
2023
+ -- Override the "spacing" setting in a ruleset.xml file to change
2024
+ -- Thanks to Juliette Reinders Folmer for the patch
2025
+ - Generic.Formatting.SpaceAfterNot now has a setting to ignore newline characters after the NOT operator
2026
+ -- Default remains FALSE, so newlines are not allowed
2027
+ -- Override the "ignoreNewlines" setting in a ruleset.xml file to change
2028
+ -- Thanks to Juliette Reinders Folmer for the patch
2029
+ - PEAR.Functions.FunctionDeclaration now checks spacing before the opening parenthesis of functions with no body
2030
+ -- Thanks to Chris Wilkinson for the patch
2031
+ - PEAR.Functions.FunctionDeclaration now enforces no space before the semicolon in functions with no body
2032
+ -- Thanks to Chris Wilkinson for the patch
2033
+ - PSR2.Classes.PropertyDeclaration now checks the order of property modifier keywords
2034
+ -- This is a rule that is documented in PSR-2 but was not enforced by the included PSR2 standard until now
2035
+ -- This sniff is also able to fix the order of the modifier keywords if they are incorrect
2036
+ -- Thanks to Juliette Reinders Folmer for the patch
2037
+ - PSR2.Methods.MethodDeclaration now checks method declarations inside traits
2038
+ -- Thanks to Chris Wilkinson for the patch
2039
+ - Squiz.Commenting.InlineComment now has better detection of comment block boundaries
2040
+ - Squiz.Classes.ClassFileName now checks that a trait name matches the filename
2041
+ -- Thanks to Chris Wilkinson for the patch
2042
+ - Squiz.Classes.SelfMemberReference now supports scoped declarations and anonymous classes
2043
+ -- Thanks to Juliette Reinders Folmer for the patch
2044
+ - Squiz.Classes.SelfMemberReference now fixes multiple errors at once, increasing fixer performance
2045
+ -- Thanks to Gabriel Ostrolucký for the patch
2046
+ - Squiz.Functions.LowercaseFunctionKeywords now checks abstract and final prefixes, and auto-fixes errors
2047
+ -- Thanks to Juliette Reinders Folmer for the patch
2048
+ - Squiz.Objects.ObjectMemberComma.Missing has been renamed to Squiz.Objects.ObjectMemberComma.Found
2049
+ -- The error is thrown when the comma is found but not required, so the error code was incorrect
2050
+ -- If you are referencing the old error code in a ruleset XML file, please use the new code instead
2051
+ -- If you wish to maintain backwards compatibility, you can provide rules for both the old and new codes
2052
+ -- Thanks to Juliette Reinders Folmer for the patch
2053
+ - Squiz.WhiteSpace.ObjectOperatorSpacing is now more tolerant of parse errors
2054
+ - Squiz.WhiteSpace.ObjectOperatorSpacing now fixes errors more efficiently
2055
+ -- Thanks to Juliette Reinders Folmer for the patch
2056
+ - Fixed bug #2109 : Generic.Functions.CallTimePassByReference false positive for bitwise and used in function argument
2057
+ - Fixed bug #2165 : Conflict between Squiz.Arrays.ArrayDeclaration and ScopeIndent sniffs when heredoc used in array
2058
+ - Fixed bug #2167 : Generic.WhiteSpace.ScopeIndent shows invalid error when scope opener indented inside inline HTML
2059
+ - Fixed bug #2178 : Generic.NamingConventions.ConstructorName matches methods in anon classes with same name as containing class
2060
+ -- Thanks to Juliette Reinders Folmer for the patch
2061
+ - Fixed bug #2190 : PEAR.Functions.FunctionCallSignature incorrect error when encountering trailing PHPCS annotation
2062
+ -- Thanks to Juliette Reinders Folmer for the patch
2063
+ - Fixed bug #2194 : Generic.Whitespace.LanguageConstructSpacing should not be checking namespace operators
2064
+ -- Thanks to Juliette Reinders Folmer for the patch
2065
+ - Fixed bug #2202 : Squiz.WhiteSpace.OperatorSpacing throws error for negative index when using curly braces for string access
2066
+ -- Same issue fixed in Squiz.Formatting.OperatorBracket
2067
+ -- Thanks to Andreas Buchenrieder for the patch
2068
+ - Fixed bug #2210 : Generic.NamingConventions.CamelCapsFunctionName not ignoring SoapClient __getCookies() method
2069
+ -- Thanks to Juliette Reinders Folmer for the patch
2070
+ - Fixed bug #2211 : PSR2.Methods.MethodDeclaration gets confused over comments between modifier keywords
2071
+ -- Thanks to Juliette Reinders Folmer for the patch
2072
+ - Fixed bug #2212 : FUNCTION and CONST in use groups being tokenised as T_FUNCTION and T_CONST
2073
+ -- Thanks to Chris Wilkinson for the patch
2074
+ - Fixed bug #2214 : File::getMemberProperties() is recognizing method params as properties
2075
+ -- Thanks to Juliette Reinders Folmer for the patch
2076
+ - Fixed bug #2236 : Memory info measurement unit is Mb but probably should be MB
2077
+ - Fixed bug #2246 : CSS tokenizer does not tokenize class names correctly when they contain the string NEW
2078
+ -- Thanks to Juliette Reinders Folmer for the patch
2079
+ - Fixed bug #2278 : Squiz.Operators.ComparisonOperatorUsage false positive when inline IF contained in parentheses
2080
+ -- Thanks to Arnout Boks for the patch
2081
+ - Fixed bug #2284 : Squiz.Functions.FunctionDeclarationArgumentSpacing removing type hint during fixing
2082
+ -- Thanks to Michał Bundyra for the patch
2083
+ - Fixed bug #2297 : Anonymous class not tokenized correctly when used as argument to another anon class
2084
+ -- Thanks to Michał Bundyra for the patch
2085
+ </notes >
2086
+ </release >
1909
2087
<release >
1910
2088
<version >
1911
2089
<release >2.9.2</release >
0 commit comments