Skip to content

Commit 1e73ee4

Browse files
Merge pull request #573 from MauricioFauth/5.9-phpunit10-support
Add support for PHPUnit 10
2 parents f136374 + ee67fce commit 1e73ee4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+62
-68
lines changed

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
"phpstan/extension-installer": "^1.1",
3434
"phpstan/phpstan": "^1.9.12",
3535
"phpstan/phpstan-phpunit": "^1.3.3",
36-
"phpunit/php-code-coverage": "*",
37-
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
36+
"phpunit/phpunit": "^8.5 || ^9.6",
3837
"psalm/plugin-phpunit": "^0.16.1",
3938
"vimeo/psalm": "^4.11",
4039
"zumba/json-serializer": "~3.0.2"

tests/Builder/CreateStatementTest.php

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,9 @@ public function testBuilderPartitions(): void
252252
/**
253253
* @return string[][]
254254
*/
255-
public function partitionQueriesProvider(): array
255+
public static function partitionQueriesProvider(): array
256256
{
257-
return [
258-
[
259-
'subparts' => <<<EOT
257+
$subPartitions = <<<EOT
260258
CREATE TABLE `ts` (
261259
`id` int(11) DEFAULT NULL,
262260
`purchased` date DEFAULT NULL
@@ -277,11 +275,9 @@ public function partitionQueriesProvider(): array
277275
SUBPARTITION s5 ENGINE=InnoDB
278276
)
279277
)
280-
EOT
281-
,
282-
],
283-
[
284-
'parts' => <<<EOT
278+
EOT;
279+
280+
$partitions = <<<EOT
285281
CREATE TABLE ptest (
286282
`event_date` date NOT NULL
287283
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
@@ -293,10 +289,9 @@ public function partitionQueriesProvider(): array
293289
PARTITION p3 ENGINE=InnoDB,
294290
PARTITION p4 ENGINE=InnoDB
295291
)
296-
EOT
297-
,
298-
],
299-
];
292+
EOT;
293+
294+
return ['subpartitions' => [$subPartitions], 'partitions' => [$partitions]];
300295
}
301296

302297
/**

tests/Components/ArrayObjTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testParse(string $test): void
5050
/**
5151
* @return string[][]
5252
*/
53-
public function parseProvider(): array
53+
public static function parseProvider(): array
5454
{
5555
return [
5656
['parser/parseArrayErr1'],

tests/Components/ExpressionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testParseErr(string $expr, string $error): void
5353
/**
5454
* @return string[][]
5555
*/
56-
public function parseErrProvider(): array
56+
public static function parseErrProvider(): array
5757
{
5858
return [
5959
/*

tests/Components/GroupKeywordTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class GroupKeywordTest extends TestCase
1616
/**
1717
* @return Generator<string, array{GroupKeyword|array<GroupKeyword>, string}>
1818
*/
19-
public function provideExpressions(): Generator
19+
public static function provideExpressions(): Generator
2020
{
2121
yield 'With no expression at all' => [[], ''];
2222

tests/Components/LimitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testParse(string $test): void
3232
/**
3333
* @return string[][]
3434
*/
35-
public function parseProvider(): array
35+
public static function parseProvider(): array
3636
{
3737
return [
3838
['parser/parseLimitErr1'],

tests/Components/LockExpressionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testParseErr(string $expr, string $error): void
4141
/**
4242
* @return string[][]
4343
*/
44-
public function parseErrProvider(): array
44+
public static function parseErrProvider(): array
4545
{
4646
return [
4747
[

tests/Lexer/ContextTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testLoadClosest(string $context, ?string $expected): void
5252
* @return array<string, array<int, string|null>>
5353
* @psalm-return array<string, array{string, (string|null)}>
5454
*/
55-
public function contextLoadingProvider(): array
55+
public static function contextLoadingProvider(): array
5656
{
5757
return [
5858
'MySQL match' => [
@@ -101,7 +101,7 @@ public function testLoadAll(string $context): void
101101
/**
102102
* @return string[][]
103103
*/
104-
public function contextNamesProvider(): array
104+
public static function contextNamesProvider(): array
105105
{
106106
return [
107107
['MySql50000'],
@@ -141,7 +141,7 @@ public function testMode($mode, int $expected): void
141141
* @return array<int, array<int, int|string>>
142142
* @psalm-return list<array{int|string, int}>
143143
*/
144-
public function providerForTestMode(): array
144+
public static function providerForTestMode(): array
145145
{
146146
return [
147147
[0, Context::SQL_MODE_NONE],

tests/Lexer/LexerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testLex(string $test): void
5959
/**
6060
* @return string[][]
6161
*/
62-
public function lexProvider(): array
62+
public static function lexProvider(): array
6363
{
6464
return [
6565
['lexer/lex'],

tests/Misc/BugsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function testBug(string $test): void
1919
/**
2020
* @return string[][]
2121
*/
22-
public function bugProvider(): array
22+
public static function bugProvider(): array
2323
{
2424
return [
2525
['bugs/fuzz1'],

0 commit comments

Comments
 (0)