Skip to content

Commit dd4f743

Browse files
committed
Drop support for phpunit 10, support 11 and 12
See: https://phpunit.de/supported-versions.html Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent d09ede4 commit dd4f743

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"phpstan/phpstan-deprecation-rules": "^2.0",
4646
"phpstan/phpstan-phpunit": "^2.0",
4747
"phpstan/phpstan-strict-rules": "^2.0",
48-
"phpunit/phpunit": "^10.5",
48+
"phpunit/phpunit": "^11 || ^12",
4949
"psalm/plugin-phpunit": "^0.19.5",
5050
"vimeo/psalm": "^6.13"
5151
},

tests/ShapeFileTest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use PhpMyAdmin\ShapeFile\ShapeFile;
2929
use PhpMyAdmin\ShapeFile\ShapeRecord;
3030
use PhpMyAdmin\ShapeFile\ShapeType;
31+
use PHPUnit\Framework\Attributes\DataProvider;
3132
use PHPUnit\Framework\TestCase;
3233

3334
use function count;
@@ -40,9 +41,8 @@ class ShapeFileTest extends TestCase
4041
* @param string $filename Name of file
4142
* @param int $records Expected number of records
4243
* @param int|null $parts Expected number of parts in first record
43-
*
44-
* @dataProvider provideFiles
4544
*/
45+
#[DataProvider('provideFiles')]
4646
public function testLoad(string $filename, int $records, int|null $parts): void
4747
{
4848
$shp = new ShapeFile(ShapeType::Point);
@@ -101,9 +101,8 @@ public static function provideFiles(): array
101101
* Test error handling in loader.
102102
*
103103
* @param string $filename name to load
104-
*
105-
* @dataProvider provideErrorFiles
106104
*/
105+
#[DataProvider('provideErrorFiles')]
107106
public function testLoadError(string $filename): void
108107
{
109108
$shp = new ShapeFile(ShapeType::Point);
@@ -313,9 +312,8 @@ public function testShapeName(): void
313312
* Test shapes save/load round-robin.
314313
*
315314
* @psalm-param list<array{mixed[], int}> $points
316-
*
317-
* @dataProvider shapesProvider
318315
*/
316+
#[DataProvider('shapesProvider')]
319317
public function testShapeSaveLoad(ShapeType $shapeType, array $points): void
320318
{
321319
$filename = './data/test_shape-' . $shapeType->value . '.*';

tests/UtilTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
namespace PhpMyAdminTest\ShapeFile;
2626

2727
use PhpMyAdmin\ShapeFile\Util;
28+
use PHPUnit\Framework\Attributes\DataProvider;
2829
use PHPUnit\Framework\TestCase;
2930

3031
class UtilTest extends TestCase
@@ -35,9 +36,8 @@ class UtilTest extends TestCase
3536
* @param string $type Data type
3637
* @param string|false $data Data to parse
3738
* @param mixed $expected Expected result
38-
*
39-
* @dataProvider data
4039
*/
40+
#[DataProvider('data')]
4141
public function testLoadData(string $type, string|false $data, mixed $expected): void
4242
{
4343
self::assertEquals(

0 commit comments

Comments
 (0)