Skip to content

Commit 56c4172

Browse files
authored
Update dev tools (#1098)
1 parent 2a35f80 commit 56c4172

File tree

8 files changed

+121
-114
lines changed

8 files changed

+121
-114
lines changed

.dev-tools/composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
"require": {
44
"php": "^8.4",
55
"ergebnis/composer-normalize": "^2.48.2",
6-
"infection/infection": "^0.31.2",
6+
"infection/infection": "^0.31.9",
77
"kubawerlos/composer-smaller-lock": "^1.1.0",
8-
"kubawerlos/php-cs-fixer-config": "^5.5",
8+
"kubawerlos/php-cs-fixer-config": "^5.6",
99
"mi-schi/phpmd-extension": "^4.3",
1010
"phpmd/phpmd": "^2.15",
1111
"phpstan/extension-installer": "^1.4.3",
12-
"phpstan/phpstan": "^2.1.29",
13-
"phpstan/phpstan-phpunit": "^2.0.7",
12+
"phpstan/phpstan": "^2.1.32",
13+
"phpstan/phpstan-phpunit": "^2.0.8",
1414
"phpstan/phpstan-strict-rules": "^2.0.7",
1515
"shipmonk/composer-dependency-analyser": "^1.8.3",
16-
"shipmonk/dead-code-detector": "^0.13.3",
16+
"shipmonk/dead-code-detector": "^0.13.5",
1717
"shipmonk/phpstan-rules": "^4.2.1",
18-
"squizlabs/php_codesniffer": "^4.0",
18+
"squizlabs/php_codesniffer": "^4.0.1",
1919
"tomasvotruba/type-coverage": "^2.0.2",
2020
"vimeo/psalm": "^6.13.1"
2121
},

.dev-tools/composer.lock

Lines changed: 92 additions & 95 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"friendsofphp/php-cs-fixer": "^3.87"
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "^9.6.24 || ^10.5.51 || ^11.5.32"
19+
"phpunit/phpunit": "^9.6.24 || ^10.5.51 || ^11.5.44"
2020
},
2121
"autoload": {
2222
"psr-4": {

tests/AutoReview/SrcCodeTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function testThereIsNoDisallowedFunctionUsedDirectly(string $className):
127127
}
128128

129129
/**
130-
* @return iterable<array{string}>
130+
* @return iterable<array{class-string}>
131131
*/
132132
public static function provideThereIsNoDisallowedFunctionUsedDirectlyCases(): iterable
133133
{
@@ -142,6 +142,8 @@ public static function provideThereIsNoDisallowedFunctionUsedDirectlyCases(): it
142142
if ($file->getRelativePath() !== '') {
143143
$namespace .= '\\' . \str_replace('/', '\\', $file->getRelativePath());
144144
}
145+
146+
/** @var class-string $className */
145147
$className = $namespace . '\\' . $file->getBasename('.php');
146148

147149
yield $className => [$className];

tests/AutoReview/TestsCodeTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ public function testDataProvidersValues(string $className): void
156156
}
157157

158158
/**
159-
* @return iterable<string, array{string}>
159+
* @return iterable<string, array{class-string}>
160160
*/
161161
public static function provideTestClassCases(): iterable
162162
{
163-
/** @var \ArrayIterator<string, array{string}> */
163+
/** @var \ArrayIterator<string, array{class-string}> */
164164
static $tests;
165165

166166
if ($tests === null) {
@@ -174,12 +174,14 @@ public static function provideTestClassCases(): iterable
174174

175175
/** @var SplFileInfo $file */
176176
foreach ($finder as $file) {
177-
$className = 'Tests';
177+
$name = 'Tests';
178178
if ($file->getRelativePath() !== '') {
179-
$className .= '\\' . \str_replace('/', '\\', $file->getRelativePath());
179+
$name .= '\\' . \str_replace('/', '\\', $file->getRelativePath());
180180
}
181181

182-
$className .= '\\' . $file->getBasename('.php');
182+
/** @var class-string $className */
183+
$className = $name . '\\' . $file->getBasename('.php');
184+
183185
$testsArray[$className] = [$className];
184186
}
185187

tests/Fixer/MultilinePromotedPropertiesFixerTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*
1919
* @covers \PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer
2020
*
21+
* @phpstan-import-type _InputConfig from \PhpCsFixer\Fixer\FunctionNotation\MultilinePromotedPropertiesFixer
22+
*
2123
* @requires PHP >= 8.0
2224
*/
2325
final class MultilinePromotedPropertiesFixerTest extends AbstractFixerTestCase
@@ -43,7 +45,7 @@ public function testIsRisky(): void
4345
}
4446

4547
/**
46-
* @param array<string, int> $configuration
48+
* @param _InputConfig $configuration
4749
*
4850
* @dataProvider provideFixCases
4951
*/
@@ -53,7 +55,7 @@ public function testFix(string $expected, ?string $input = null, array $configur
5355
}
5456

5557
/**
56-
* @return iterable<array{0: string, 1: null|string, 2?: array<string, bool|int>, 3?: WhitespacesFixerConfig}>
58+
* @return iterable<array{0: string, 1: null|string, 2?: _InputConfig, 3?: WhitespacesFixerConfig}>
5759
*/
5860
public static function provideFixCases(): iterable
5961
{

tests/Fixer/PhpdocTagNoNamedArgumentsFixerTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* @internal
2020
*
2121
* @covers \PhpCsFixerCustomFixers\Fixer\PhpdocTagNoNamedArgumentsFixer
22+
*
23+
* @phpstan-import-type _InputConfig from \PhpCsFixerCustomFixers\Fixer\PhpdocTagNoNamedArgumentsFixer
2224
*/
2325
final class PhpdocTagNoNamedArgumentsFixerTest extends AbstractFixerTestCase
2426
{
@@ -54,7 +56,7 @@ public function testSuccessorName(): void
5456
}
5557

5658
/**
57-
* @param array<string, int> $configuration
59+
* @param _InputConfig $configuration
5860
*
5961
* @dataProvider provideFixCases
6062
*/
@@ -64,7 +66,7 @@ public function testFix(string $expected, ?string $input = null, array $configur
6466
}
6567

6668
/**
67-
* @return iterable<string, array{0: string, 1?: null|string, 2?: array{path_prefix?: string, description?: string}, 3?: WhitespacesFixerConfig}>
69+
* @return iterable<string, array{0: string, 1?: null|string, 2?: _InputConfig, 3?: WhitespacesFixerConfig}>
6870
*/
6971
public static function provideFixCases(): iterable
7072
{

tests/Fixer/PromotedConstructorPropertyFixerTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*
1717
* @covers \PhpCsFixerCustomFixers\Fixer\PromotedConstructorPropertyFixer
1818
*
19+
* @phpstan-import-type _InputConfig from \PhpCsFixerCustomFixers\Fixer\PromotedConstructorPropertyFixer
20+
*
1921
* @requires PHP >= 8.0
2022
*/
2123
final class PromotedConstructorPropertyFixerTest extends AbstractFixerTestCase
@@ -33,7 +35,7 @@ public function testIsRisky(): void
3335
}
3436

3537
/**
36-
* @param array<string, list<string>> $configuration
38+
* @param _InputConfig $configuration
3739
*
3840
* @dataProvider provideFixCases
3941
*/
@@ -43,7 +45,7 @@ public function testFix(string $expected, ?string $input = null, array $configur
4345
}
4446

4547
/**
46-
* @return iterable<array{0: string, 1?: string}>
48+
* @return iterable<array{0: string, 1?: string, 2?: _InputConfig}>
4749
*/
4850
public static function provideFixCases(): iterable
4951
{

0 commit comments

Comments
 (0)