Skip to content

Commit d637978

Browse files
committed
Bump PHPUnit to version 10.0
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent 2815880 commit d637978

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

+77
-78
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"phpstan/extension-installer": "^1.2",
3333
"phpstan/phpstan": "^1.10",
3434
"phpstan/phpstan-phpunit": "^1.3",
35-
"phpunit/phpunit": "^9.6",
35+
"phpunit/phpunit": "^10.0",
3636
"psalm/plugin-phpunit": "^0.18.4",
3737
"vimeo/psalm": "^5.7",
3838
"zumba/json-serializer": "^3.0"

phpunit.xml.dist

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
5+
cacheDirectory="build/.phpunit.cache"
6+
executionOrder="random"
7+
requireCoverageMetadata="false"
8+
beStrictAboutCoverageMetadata="true"
59
beStrictAboutOutputDuringTests="true"
6-
colors="true"
7-
verbose="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
11-
processIsolation="false"
12-
stopOnFailure="false">
13-
<logging>
14-
<log type="coverage-clover" target="build/logs/clover.xml"/>
15-
<log type="coverage-xml" target="build/logs/coverage-xml"/>
16-
<log type="junit" target="build/logs/junit.xml"/>
17-
</logging>
10+
failOnRisky="true"
11+
failOnWarning="true"
12+
colors="true">
1813
<testsuites>
1914
<testsuite name="Builder">
2015
<directory suffix=".php">./tests/Builder</directory>
@@ -38,14 +33,18 @@
3833
<directory suffix=".php">./tests/Tools</directory>
3934
</testsuite>
4035
</testsuites>
41-
<filter>
42-
<whitelist processUncoveredFilesFromWhitelist="true">
43-
<directory suffix=".php">src/</directory>
44-
</whitelist>
45-
</filter>
46-
<php>
47-
<ini name="display_errors" value="On" />
48-
<ini name="display_startup_errors" value="On" />
49-
<ini name="error_reporting" value="E_ALL" />
50-
</php>
36+
37+
<coverage>
38+
<include>
39+
<directory suffix=".php">src</directory>
40+
</include>
41+
<report>
42+
<clover outputFile="build/logs/clover.xml"/>
43+
<xml outputDirectory="build/logs/coverage-xml"/>
44+
</report>
45+
</coverage>
46+
47+
<logging>
48+
<junit outputFile="build/logs/junit.xml"/>
49+
</logging>
5150
</phpunit>

tests/Builder/CreateStatementTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public function testBuilderPartitions(): void
241241
/**
242242
* @return string[][]
243243
*/
244-
public function partitionQueriesProvider(): array
244+
public static function partitionQueriesProvider(): array
245245
{
246246
return [
247247
[

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
@@ -47,7 +47,7 @@ public function testLoadClosest(string $context, ?string $expected): void
4747
* @return array<string, array<int, string|null>>
4848
* @psalm-return array<string, array{string, (string|null)}>
4949
*/
50-
public function contextLoadingProvider(): array
50+
public static function contextLoadingProvider(): array
5151
{
5252
return [
5353
'MySQL match' => [
@@ -96,7 +96,7 @@ public function testLoadAll(string $context): void
9696
/**
9797
* @return string[][]
9898
*/
99-
public function contextNamesProvider(): array
99+
public static function contextNamesProvider(): array
100100
{
101101
return [
102102
['MySql50000'],
@@ -136,7 +136,7 @@ public function testMode($mode, int $expected): void
136136
* @return array<int, array<int, int|string>>
137137
* @psalm-return list<array{int|string, int}>
138138
*/
139-
public function providerForTestMode(): array
139+
public static function providerForTestMode(): array
140140
{
141141
return [
142142
[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'],

0 commit comments

Comments
 (0)