Skip to content

Commit 1623c49

Browse files
authored
Update minimum PHP CS Fixer version after renaming PhpUnitTestCaseIndicator to PhpUnitTestCaseAnalyzer (#1048)
1 parent c691e2d commit 1623c49

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# CHANGELOG for PHP CS Fixer: custom fixers
22

3+
## v3.29.0
4+
- Update minimum PHP CS Fixer version to 3.77.0
5+
36
## v3.28.0
47
- Deprecate MultilinePromotedPropertiesFixer - use "multiline_promoted_properties"
58
- Update minimum PHP CS Fixer version to 3.76.0

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"php": "^7.4 || ^8.0",
1414
"ext-filter": "*",
1515
"ext-tokenizer": "*",
16-
"friendsofphp/php-cs-fixer": "^3.76"
16+
"friendsofphp/php-cs-fixer": "^3.77"
1717
},
1818
"require-dev": {
1919
"phpunit/phpunit": "^9.6.22 || 10.5.45 || ^11.5.7"

src/Fixer/PhpUnitRequiresConstraintFixer.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,11 @@ public function fix(\SplFileInfo $file, Tokens $tokens): void
8181
private static function fixClass(Tokens $tokens, int $index, int $endIndex): void
8282
{
8383
while ($index < $endIndex) {
84-
$index = $tokens->getNextTokenOfKind($index, ['{', [\T_FUNCTION]]);
84+
$index = $tokens->getNextTokenOfKind($index, [[\T_FUNCTION]]);
8585
if ($index === null || $index >= $endIndex) {
8686
return;
8787
}
8888

89-
if ($tokens[$index]->equals('{')) {
90-
$index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
91-
continue;
92-
}
93-
9489
self::fixMethod($tokens, $index);
9590
}
9691
}

tests/Fixer/PhpUnitRequiresConstraintFixerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testFoo1() {}
7272
public function testFo2o() {
7373
new class extends TestCase {
7474
/**
75-
* @requires PHP 8.2
75+
* @requires PHP >= 8.2
7676
*/
7777
public function testX() {}
7878
};

0 commit comments

Comments
 (0)