Skip to content

Commit 1753c9f

Browse files
authored
Merge pull request #857 from Automattic/feature/composer-update-minimum-versions
2 parents fd041e4 + af4f80d commit 1753c9f

File tree

3 files changed

+11
-45
lines changed

3 files changed

+11
-45
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ The rulesets use rules from the [WordPress Coding Standards](https://github.com/
1616
## Minimal requirements
1717

1818
* PHP 5.4+
19-
* [PHPCS 3.8.0+](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases)
20-
* [PHPCSUtils 1.0.9+](https://github.com/PHPCSStandards/PHPCSUtils)
21-
* [PHPCSExtra 1.2.1+](https://github.com/PHPCSStandards/PHPCSExtra)
22-
* [WPCS 3.0.0+](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/releases)
23-
* [VariableAnalysis 2.11.17+](https://github.com/sirbrillig/phpcs-variable-analysis/releases)
19+
* [PHPCS 3.13.2+](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases)
20+
* [PHPCSUtils 1.1.0+](https://github.com/PHPCSStandards/PHPCSUtils)
21+
* [PHPCSExtra 1.4.0+](https://github.com/PHPCSStandards/PHPCSExtra)
22+
* [WPCS 3.1.0+](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/releases)
23+
* [VariableAnalysis 2.12.0+](https://github.com/sirbrillig/phpcs-variable-analysis/releases)
2424

2525
## Installation
2626

WordPressVIPMinimum/Sniffs/Performance/FetchingRemoteDataSniff.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -94,40 +94,6 @@ public function process_parameters( $stackPtr, $group_name, $matched_content, $p
9494
}
9595
}
9696

97-
/**
98-
* Process the function if no parameters were found.
99-
*
100-
* {@internal This method is only needed for handling PHP 8.1+ first class callables on WPCS < 3.2.0.
101-
* Once the minimum supported WPCS is 3.2.0 or higher, this method should be removed.}
102-
*
103-
* @param int $stackPtr The position of the current token in the stack.
104-
* @param string $group_name The name of the group which was matched.
105-
* @param string $matched_content The token content (function name) which was matched
106-
* in lowercase.
107-
*
108-
* @return void
109-
*/
110-
public function process_no_parameters( $stackPtr, $group_name, $matched_content ) {
111-
// Check if this is a first class callable.
112-
$next = $this->phpcsFile->findNext( Tokens::$emptyTokens, ( $stackPtr + 1 ), null, true );
113-
if ( $next === false
114-
|| $this->tokens[ $next ]['code'] !== T_OPEN_PARENTHESIS
115-
|| isset( $this->tokens[ $next ]['parenthesis_closer'] ) === false
116-
) {
117-
// Live coding/parse error. Ignore.
118-
return;
119-
}
120-
121-
// First class callable.
122-
$firstNonEmpty = $this->phpcsFile->findNext( Tokens::$emptyTokens, ( $next + 1 ), null, true );
123-
if ( $this->tokens[ $firstNonEmpty ]['code'] === T_ELLIPSIS ) {
124-
$secondNonEmpty = $this->phpcsFile->findNext( Tokens::$emptyTokens, ( $firstNonEmpty + 1 ), null, true );
125-
if ( $this->tokens[ $secondNonEmpty ]['code'] === T_CLOSE_PARENTHESIS ) {
126-
$this->add_contents_unknown_warning( $stackPtr, [ $matched_content ] );
127-
}
128-
}
129-
}
130-
13197
/**
13298
* Process the function if it is used as a first class callable.
13399
*

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
],
1818
"require": {
1919
"php": ">=5.4",
20-
"phpcsstandards/phpcsextra": "^1.2.1",
21-
"phpcsstandards/phpcsutils": "^1.0.11",
22-
"sirbrillig/phpcs-variable-analysis": "^2.11.18",
23-
"squizlabs/php_codesniffer": "^3.9.2",
24-
"wp-coding-standards/wpcs": "^3.1.0"
20+
"phpcsstandards/phpcsextra": "^1.4.0",
21+
"phpcsstandards/phpcsutils": "^1.1.0",
22+
"sirbrillig/phpcs-variable-analysis": "^2.12.0",
23+
"squizlabs/php_codesniffer": "^3.13.2",
24+
"wp-coding-standards/wpcs": "^3.2.0"
2525
},
2626
"require-dev": {
2727
"php-parallel-lint/php-parallel-lint": "^1.4.0",
2828
"php-parallel-lint/php-console-highlighter": "^1.0.0",
2929
"phpcompatibility/php-compatibility": "^9",
30-
"phpcsstandards/phpcsdevtools": "^1.0",
30+
"phpcsstandards/phpcsdevtools": "^1.2.3",
3131
"phpunit/phpunit": "^4 || ^5 || ^6 || ^7 || ^8 || ^9"
3232
},
3333
"config": {

0 commit comments

Comments
 (0)