Skip to content

Commit a2bde79

Browse files
committed
Changelog + minor fix for #2751
1 parent 08e033e commit a2bde79

File tree

3 files changed

+7
-57
lines changed

3 files changed

+7
-57
lines changed

package.xml

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -17,67 +17,17 @@ http://pear.php.net/dtd/package-2.0.xsd">
1717
<date>2019-12-04</date>
1818
<time>15:42:00</time>
1919
<version>
20-
<release>3.5.3</release>
21-
<api>3.5.3</api>
20+
<release>3.5.4</release>
21+
<api>3.5.4</api>
2222
</version>
2323
<stability>
2424
<release>stable</release>
2525
<api>stable</api>
2626
</stability>
2727
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
2828
<notes>
29-
- The PHP 7.4 T_FN token has been made available for older versions
30-
-- T_FN represents the fn string used for arrow functions
31-
-- The double arrow becomes the scope opener, and uses a new T_FN_ARROW token type
32-
-- The token after the statement (normally a semicolon) becomes the scope closer
33-
-- The token is also associated with the opening and closing parenthesis of the statement
34-
-- Any functions named "fn" will cause have a T_FN token for the function name, but have no scope information
35-
-- Thanks to Michał Bundyra for the help with this change
36-
- PHP 7.4 numeric separators are now tokenized in the same way when using older PHP versions
37-
-- Previously, a number like 1_000 would tokenize as T_LNUMBER (1), T_STRING (_000)
38-
-- Now, the number tokenizes as T_LNUMBER (1_000)
39-
-- Sniff developers should consider how numbers with underscores impact their custom sniffs
40-
- The PHPCS file cache now takes file permissions into account
41-
-- The cache is now invalidated for a file when its permissions are changed
42-
- File::getMethodParameters() now supports arrow functions
43-
- File::getMethodProperties() now supports arrow functions
44-
- Added Fixer::changeCodeBlockIndent() to change the indent of a code block while auto-fixing
45-
-- Can be used to either increase or decrease the indent
46-
-- Useful when moving the start position of something like a closure, where you want the content to also move
47-
- Added Generic.Files.ExecutableFile sniff
48-
-- Ensures that files are not executable
49-
-- Thanks to Matthew Peveler for the contribution
50-
- Generic.CodeAnalysis.EmptyPhpStatement now reports unnecessary semicolons after control structure closing braces
51-
-- Thanks to Vincent Langlet for the patch
52-
- Generic.PHP.LowerCaseKeyword now enforces that the "fn" keyword is lowercase
53-
-- Thanks to Michał Bundyra for the patch
54-
- Generic.WhiteSpace.ScopeIndent now supports static arrow functions
55-
- PEAR.Functions.FunctionCallSignature now adjusts the indent of function argument contents during auto-fixing
56-
-- Previously, only the first line of an argument was changed, leading to inconsistent indents
57-
-- This change also applies to PSR2.Methods.FunctionCallSignature
58-
- PSR2.ControlStructures.ControlStructureSpacing now checks whitespace before the closing parenthesis of multi-line control structures
59-
-- Previously, it incorrectly applied the whitespace check for single-line definitions only
60-
- PSR12.Functions.ReturnTypeDeclaration now checks the return type of arrow functions
61-
-- Thanks to Michał Bundyra for the patch
62-
- PSR12.Traits.UseDeclaration now ensures all trait import statements are grouped together
63-
-- Previously, the trait import section of the class ended when the first non-import statement was found
64-
-- Checking now continues throughout the class to ensure all statements are grouped together
65-
-- This also ensures that empty lines are not requested after an import statement that isn't the last one
66-
- Squiz.Functions.LowercaseFunctionKeywords now enforces that the "fn" keyword is lowercase
67-
-- Thanks to Michał Bundyra for the patch
68-
- Fixed bug #2586 : Generic.WhiteSpace.ScopeIndent false positives when indenting open tags at a non tab-stop
69-
- Fixed bug #2638 : Squiz.CSS.DuplicateClassDefinitionSniff sees comments as part of the class name
70-
-- Thanks to Raphael Horber for the patch
71-
- Fixed bug #2640 : Squiz.WhiteSpace.OperatorSpacing false positives for some negation operators
72-
-- Thanks to Jakub Chábek and Juliette Reinders Folmer for the patch
73-
- Fixed bug #2674 : Squiz.Functions.FunctionDeclarationArgumentSpacing prints wrong argument name in error message
74-
- Fixed bug #2676 : PSR12.Files.FileHeader locks up when file ends with multiple inline comments
75-
- Fixed bug #2678 : PSR12.Classes.AnonClassDeclaration incorrectly enforcing that closing brace be on a line by itself
76-
- Fixed bug #2685 : File::getMethodParameters() setting typeHintEndToken for vars with no type hint
77-
-- Thanks to Juliette Reinders Folmer for the patch
78-
- Fixed bug #2694 : AbstractArraySniff produces invalid indices when using ternary operator
79-
-- Thanks to Michał Bundyra for the patch
80-
- Fixed bug #2702 : Generic.WhiteSpace.ScopeIndent false positive when using ternary operator with short arrays
29+
- Fixed bug #2751 : Autoload relative paths first to avoid confusion with files from the global include path
30+
-- Thanks to Klaus Purer for the patch
8131
</notes>
8232
<contents>
8333
<dir name="/">

src/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Config
2323
*
2424
* @var string
2525
*/
26-
const VERSION = '3.5.3';
26+
const VERSION = '3.5.4';
2727

2828
/**
2929
* Package stability; either stable, beta or alpha.

src/Ruleset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ public function processRuleset($rulesetPath, $depth=0)
349349
$ownSniffs = $this->expandSniffDirectory($sniffDir, $depth);
350350
}
351351

352-
// Included custom autoloaders.
352+
// Include custom autoloaders.
353353
foreach ($ruleset->{'autoload'} as $autoload) {
354354
if ($this->shouldProcessElement($autoload) === false) {
355355
continue;
@@ -360,7 +360,7 @@ public function processRuleset($rulesetPath, $depth=0)
360360
// Try relative autoload paths first.
361361
$relativePath = Util\Common::realPath(dirname($rulesetPath).DIRECTORY_SEPARATOR.$autoloadPath);
362362

363-
if ($relativePath !== false && is_file($$relativePath) === true) {
363+
if ($relativePath !== false && is_file($relativePath) === true) {
364364
$autoloadPath = $relativePath;
365365
} else if (is_file($autoloadPath) === false) {
366366
throw new RuntimeException('The specified autoload file "'.$autoload.'" does not exist');

0 commit comments

Comments
 (0)