Skip to content

Commit b0ba2af

Browse files
committed
Update to PHPUnit 11 and require PHP 8.2+
1 parent 01f6bb3 commit b0ba2af

6 files changed

Lines changed: 14 additions & 16 deletions

File tree

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77

88
strategy:
99
matrix:
10-
php: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
10+
php: [ '8.2', '8.3', '8.4', '8.5' ]
1111

1212
services:
1313
mysql:

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.1",
19+
"php": ">=8.2",
2020
"ext-pdo": "*"
2121
},
2222
"require-dev": {
2323
"friendsofphp/php-cs-fixer": "^3.91",
2424
"phpstan/phpstan": "^2.1.32",
25-
"phpunit/phpunit": "^10.5",
25+
"phpunit/phpunit": "^11.5",
2626
"ramsey/uuid": "^4.9"
2727
},
2828
"autoload": {
@@ -42,9 +42,9 @@
4242
"analyze": "phpstan analyze",
4343
"cs-fix": "php-cs-fixer fix -v",
4444
"test": "phpunit test --bootstrap test/bootstrap.php",
45-
"test-mssql": "@test --exclude-group mysql,pgsql",
46-
"test-mysql": "@test --exclude-group mssql,pgsql",
47-
"test-pgsql": "@test --exclude-group mssql,mysql",
45+
"test-mssql": "@test --exclude-group mysql --exclude-group pgsql",
46+
"test-mysql": "@test --exclude-group mssql --exclude-group pgsql",
47+
"test-pgsql": "@test --exclude-group mssql --exclude-group mysql",
4848
"test-without-mssql": "@test --exclude-group mssql"
4949
}
5050
}

test/MssqlDbTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
use DevTheorem\PeachySQL\PeachySql;
66
use DevTheorem\PeachySQL\Test\src\App;
77
use PDO;
8+
use PHPUnit\Framework\Attributes\Group;
89

9-
/**
10-
* @group mssql
11-
*/
10+
#[Group('mssql')]
1211
class MssqlDbTest extends DbTestCase
1312
{
1413
private static ?PeachySql $db = null;

test/MysqlDbTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
use DevTheorem\PeachySQL\PeachySql;
66
use DevTheorem\PeachySQL\Test\src\App;
77
use PDO;
8+
use PHPUnit\Framework\Attributes\Group;
89

9-
/**
10-
* @group mysql
11-
*/
10+
#[Group('mysql')]
1211
class MysqlDbTest extends DbTestCase
1312
{
1413
private static ?PeachySql $db = null;

test/PgsqlDbTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
use DevTheorem\PeachySQL\PeachySql;
66
use DevTheorem\PeachySQL\Test\src\App;
77
use PDO;
8+
use PHPUnit\Framework\Attributes\Group;
89

9-
/**
10-
* @group pgsql
11-
*/
10+
#[Group('pgsql')]
1211
class PgsqlDbTest extends DbTestCase
1312
{
1413
private static ?PeachySql $db = null;

test/QueryBuilder/InsertTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use DevTheorem\PeachySQL\Options;
66
use DevTheorem\PeachySQL\QueryBuilder\Insert;
7+
use PHPUnit\Framework\Attributes\DataProvider;
78
use PHPUnit\Framework\TestCase;
89

910
/**
@@ -53,10 +54,10 @@ public static function batchRowsTestCases(): array
5354
}
5455

5556
/**
56-
* @dataProvider batchRowsTestCases
5757
* @param list<array<string, string>> $colVals
5858
* @param list<list<array<string, string>>> $expected
5959
*/
60+
#[DataProvider('batchRowsTestCases')]
6061
public function testBatchRows(array $colVals, int $maxParams, int $maxRows, array $expected): void
6162
{
6263
$result = Insert::batchRows($colVals, $maxParams, $maxRows);

0 commit comments

Comments
 (0)