Skip to content

Commit 826fa7d

Browse files
authored
Update phpunit to v11 (#105)
1 parent b33c143 commit 826fa7d

10 files changed

+18
-36
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"laravel/framework": "^9.0|^10.0|^11.0|^12.0"
1313
},
1414
"require-dev": {
15-
"phpunit/phpunit": "^10.0",
15+
"phpunit/phpunit": "^11.0",
1616
"fakerphp/faker": "^1.7",
1717
"friendsofphp/php-cs-fixer": "^3.0",
1818
"vimeo/psalm": "^5.0|^6.0",
@@ -36,7 +36,7 @@
3636
}
3737
],
3838
"scripts": {
39-
"test": "vendor/bin/phpunit --configuration phpunit.xml.dist",
39+
"test": "vendor/bin/phpunit --configuration phpunit.xml.dist --display-deprecations --display-phpunit-deprecations",
4040
"coverage": "vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-html=tests/coverage",
4141
"fixer": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -vv --allow-risky=yes",
4242
"linter": [

psalm.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
<projectFiles>
1111
<directory name="./src"/>
1212
<directory name="./tests"/>
13-
<ignoreFiles>
14-
</ignoreFiles>
1513
</projectFiles>
1614

1715
<issueHandlers>

tests/Serializer/CompiledEntitesDenormalizerTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ final class CompiledEntitesDenormalizerTest extends BaseCase
1717
{
1818
/**
1919
* Проверяет, что денормалайзер правильно определит, что может преобразовать тип.
20-
*
21-
* @dataProvider provideSupportsDenormalization
2220
*/
21+
#[\PHPUnit\Framework\Attributes\DataProvider('provideSupportsDenormalization')]
2322
public function testSupportsDenormalization(string $type, string $format, bool $expected): void
2423
{
2524
$denormalizer = new CompiledEntitesDenormalizer();
@@ -138,9 +137,8 @@ public function testDenormalizeWithObjectToPopulateException(): void
138137

139138
/**
140139
* Проверяет, что денормалайзер вернет верный список поддерживаемых объектов.
141-
*
142-
* @dataProvider provideGetSupportedTypes
143140
*/
141+
#[\PHPUnit\Framework\Attributes\DataProvider('provideGetSupportedTypes')]
144142
public function testGetSupportedTypes(?string $format, array|true $expected): void
145143
{
146144
$denormalizer = new CompiledEntitesDenormalizer();

tests/Serializer/FiasEloquentDenormalizerTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ final class FiasEloquentDenormalizerTest extends BaseCase
2020
{
2121
/**
2222
* Проверяет, что денормалайзер правильно определит, что может преобразовать тип.
23-
*
24-
* @dataProvider provideSupportsDenormalization
2523
*/
24+
#[\PHPUnit\Framework\Attributes\DataProvider('provideSupportsDenormalization')]
2625
public function testSupportsDenormalization(string $type, string $format, bool $expected): void
2726
{
2827
$caster = $this->mock(TypeCaster::class);
@@ -172,9 +171,8 @@ public function testDenormalizeNotNormalizableValueException(): void
172171

173172
/**
174173
* Проверяет, что денормалайзер вернет верный список поддерживаемых объектов.
175-
*
176-
* @dataProvider provideGetSupportedTypes
177174
*/
175+
#[\PHPUnit\Framework\Attributes\DataProvider('provideGetSupportedTypes')]
178176
public function testGetSupportedTypes(?string $format, array $expected): void
179177
{
180178
$caster = $this->mock(TypeCaster::class);

tests/Serializer/TypeCaster/BoolCasterTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ final class BoolCasterTest extends BaseCase
1414
{
1515
/**
1616
* Проверяет, что кастер правильно определит тип преобразования.
17-
*
18-
* @dataProvider provideTestCanCast
1917
*/
18+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCanCast')]
2019
public function testCanCast(string $type, mixed $value, mixed $expected): void
2120
{
2221
$caster = new BoolCaster();
@@ -49,9 +48,8 @@ public static function provideTestCanCast(): array
4948

5049
/**
5150
* Проверяет, что кастер правильно преобразует значение.
52-
*
53-
* @dataProvider provideTestCast
5451
*/
52+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCast')]
5553
public function testCast(string $type, mixed $value, mixed $expected): void
5654
{
5755
$caster = new BoolCaster();

tests/Serializer/TypeCaster/DateCasterTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ final class DateCasterTest extends BaseCase
1414
{
1515
/**
1616
* Проверяет, что кастер правильно определит тип преобразования.
17-
*
18-
* @dataProvider provideTestCanCast
1917
*/
18+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCanCast')]
2019
public function testCanCast(string $type, mixed $value, mixed $expected): void
2120
{
2221
$caster = new DateCaster();
@@ -49,9 +48,8 @@ public static function provideTestCanCast(): array
4948

5049
/**
5150
* Проверяет, что кастер правильно преобразует значение.
52-
*
53-
* @dataProvider provideTestCast
5451
*/
52+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCast')]
5553
public function testCast(string $type, mixed $value, mixed $expected): void
5654
{
5755
$caster = new DateCaster();

tests/Serializer/TypeCaster/FloatCasterTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ final class FloatCasterTest extends BaseCase
1414
{
1515
/**
1616
* Проверяет, что кастер правильно определит тип преобразования.
17-
*
18-
* @dataProvider provideTestCanCast
1917
*/
18+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCanCast')]
2019
public function testCanCast(string $type, mixed $value, mixed $expected): void
2120
{
2221
$caster = new FloatCaster();
@@ -59,9 +58,8 @@ public static function provideTestCanCast(): array
5958

6059
/**
6160
* Проверяет, что кастер правильно преобразует значение.
62-
*
63-
* @dataProvider provideTestCast
6461
*/
62+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCast')]
6563
public function testCast(string $type, mixed $value, mixed $expected): void
6664
{
6765
$caster = new FloatCaster();

tests/Serializer/TypeCaster/IntCasterTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ final class IntCasterTest extends BaseCase
1414
{
1515
/**
1616
* Проверяет, что кастер правильно определит тип преобразования.
17-
*
18-
* @dataProvider provideTestCanCast
1917
*/
18+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCanCast')]
2019
public function testCanCast(string $type, mixed $value, mixed $expected): void
2120
{
2221
$caster = new IntCaster();
@@ -49,9 +48,8 @@ public static function provideTestCanCast(): array
4948

5049
/**
5150
* Проверяет, что кастер правильно преобразует значение.
52-
*
53-
* @dataProvider provideTestCast
5451
*/
52+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCast')]
5553
public function testCast(string $type, mixed $value, mixed $expected): void
5654
{
5755
$caster = new IntCaster();

tests/Serializer/TypeCaster/StringCasterTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ final class StringCasterTest extends BaseCase
1414
{
1515
/**
1616
* Проверяет, что кастер правильно определит тип преобразования.
17-
*
18-
* @dataProvider provideTestCanCast
1917
*/
18+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCanCast')]
2019
public function testCanCast(string $type, mixed $value, mixed $expected): void
2120
{
2221
$caster = new StringCaster();
@@ -49,9 +48,8 @@ public static function provideTestCanCast(): array
4948

5049
/**
5150
* Проверяет, что кастер правильно преобразует значение.
52-
*
53-
* @dataProvider provideTestCast
5451
*/
52+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCast')]
5553
public function testCast(string $type, mixed $value, mixed $expected): void
5654
{
5755
$caster = new StringCaster();

tests/Serializer/TypeCaster/TimestampCasterTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ final class TimestampCasterTest extends BaseCase
1414
{
1515
/**
1616
* Проверяет, что кастер правильно определит тип преобразования.
17-
*
18-
* @dataProvider provideTestCanCast
1917
*/
18+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCanCast')]
2019
public function testCanCast(string $type, mixed $value, mixed $expected): void
2120
{
2221
$caster = new TimestampCaster();
@@ -44,9 +43,8 @@ public static function provideTestCanCast(): array
4443

4544
/**
4645
* Проверяет, что кастер правильно преобразует значение.
47-
*
48-
* @dataProvider provideTestCast
4946
*/
47+
#[\PHPUnit\Framework\Attributes\DataProvider('provideTestCast')]
5048
public function testCast(string $type, mixed $value, mixed $expected): void
5149
{
5250
$caster = new TimestampCaster();

0 commit comments

Comments
 (0)