Skip to content

Commit a279ba9

Browse files
committed
Upgrade PHPUnit 10
1 parent 0b61f98 commit a279ba9

File tree

5 files changed

+11
-37
lines changed

5 files changed

+11
-37
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
'@DoctrineAnnotation' => true,
2222
'@PHP81Migration' => true,
2323
'@PHP80Migration:risky' => true,
24-
'@PHPUnit84Migration:risky' => true,
24+
'@PHPUnit100Migration:risky' => true,
2525
'array_syntax' => ['syntax' => 'short'],
2626
'fopen_flags' => true,
2727
'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'],

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232
"symfony/process": "^6.4|^7.3|^8.0"
3333
},
3434
"require-dev": {
35-
"dg/bypass-finals": "^1.3",
35+
"dg/bypass-finals": "^1.6",
3636
"friendsofphp/php-cs-fixer": "^3.0",
3737
"phpstan/extension-installer": "^1.3",
3838
"phpstan/phpstan": "^1.10",
3939
"phpstan/phpstan-symfony": "^1.3",
40-
"phpunit/phpunit": "^9"
40+
"phpunit/phpunit": "^10"
4141
},
4242
"config": {
4343
"sort-packages": true,

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
bootstrap="vendor/autoload.php"
1010
>
1111
<extensions>
12-
<extension class="Ecommit\DeployRsyncBundle\Tests\BypassFinalHook"/>
12+
<bootstrap class="DG\BypassFinals\PHPUnitExtension"/>
1313
</extensions>
1414

1515
<testsuites>

tests/BypassFinalHook.php

Lines changed: 0 additions & 25 deletions
This file was deleted.

tests/Command/DeployRsyncCommandTest.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testSuccess(string $environment, array $expectedCommand): void
3636
$this->assertSame(0, $exitCode);
3737
}
3838

39-
public function getTestSuccessProvider(): \Generator
39+
public static function getTestSuccessProvider(): \Generator
4040
{
4141
yield ['env1', [
4242
'rsync',
@@ -92,7 +92,7 @@ public function testSuccessGo(string $environment, array $expectedCommand): void
9292
$this->assertSame(0, $exitCode);
9393
}
9494

95-
public function getTestSuccessGoProvider(): \Generator
95+
public static function getTestSuccessGoProvider(): \Generator
9696
{
9797
yield ['env1', [
9898
'rsync',
@@ -159,7 +159,7 @@ public function testSuccessWithoutIgnoreFile(string $environment, array $expecte
159159
$this->assertSame(0, $exitCode);
160160
}
161161

162-
public function getTestSuccessWithoutIgnoreFileProvider(): \Generator
162+
public static function getTestSuccessWithoutIgnoreFileProvider(): \Generator
163163
{
164164
yield ['env1', [
165165
'rsync',
@@ -227,7 +227,7 @@ public function testWithGlobalIgnoreFileAndWithEnvIgnoreFile(string $environment
227227
$this->assertSame(0, $exitCode);
228228
}
229229

230-
public function getTestWithGlobalIgnoreFileAndWithEnvIgnoreFileProvider(): \Generator
230+
public static function getTestWithGlobalIgnoreFileAndWithEnvIgnoreFileProvider(): \Generator
231231
{
232232
yield ['env1', [
233233
'rsync',
@@ -285,7 +285,7 @@ public function testWithoutGlobalIgnoreFileAndWithEnvIgnoreFile(string $environm
285285
$this->assertSame(0, $exitCode);
286286
}
287287

288-
public function getTestWithoutGlobalIgnoreFileAndWithEnvIgnoreFileProvider(): \Generator
288+
public static function getTestWithoutGlobalIgnoreFileAndWithEnvIgnoreFileProvider(): \Generator
289289
{
290290
yield ['env1', [
291291
'rsync',
@@ -345,7 +345,7 @@ public function testWithEnvRsyncOptions(string $environment, array $expectedComm
345345
$this->assertSame(0, $exitCode);
346346
}
347347

348-
public function getTestWithEnvRsyncOptionsProvider(): \Generator
348+
public static function getTestWithEnvRsyncOptionsProvider(): \Generator
349349
{
350350
yield ['env1', [
351351
'rsync',
@@ -412,13 +412,12 @@ public function testGetDirPath(string $dir, string $expected): void
412412
{
413413
$class = new \ReflectionClass(DeployRsyncCommand::class);
414414
$method = $class->getMethod('getDirPath');
415-
$method->setAccessible(true);
416415
$command = new DeployRsyncCommand([], [], ''); // @phpstan-ignore-line
417416

418417
$this->assertSame($expected, $method->invokeArgs($command, [$dir]));
419418
}
420419

421-
public function getTestGetDirPathProvider(): array
420+
public static function getTestGetDirPathProvider(): array
422421
{
423422
return [
424423
['dir', 'dir/'],

0 commit comments

Comments
 (0)