Skip to content

Commit 5782f28

Browse files
committed
update to phpunit 10
1 parent bcca098 commit 5782f28

File tree

4 files changed

+24
-41
lines changed

4 files changed

+24
-41
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,5 @@ nb-configuration.xml
126126
/results/
127127
/phpunit*.xml
128128
/.phpunit.*.cache
129-
129+
/.phpunit.cache
130130
/.php-cs-fixer.php

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
"autoload": {
2727
"psr-4": {
2828
"CodeIgniter\\Queue\\": "src"
29-
}
29+
},
30+
"exclude-from-classmap": [
31+
"**/Database/Migrations/**"
32+
]
3033
},
3134
"autoload-dev": {
3235
"psr-4": {

phpunit.xml.dist

Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
44
bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
55
backupGlobals="false"
6-
beStrictAboutCoversAnnotation="true"
76
beStrictAboutOutputDuringTests="true"
8-
beStrictAboutTodoAnnotatedTests="true"
97
colors="true"
10-
convertErrorsToExceptions="true"
11-
convertNoticesToExceptions="true"
12-
convertWarningsToExceptions="true"
138
executionOrder="random"
149
failOnRisky="true"
1510
failOnWarning="true"
1611
stopOnError="false"
1712
stopOnFailure="false"
1813
stopOnIncomplete="false"
1914
stopOnSkipped="false"
20-
verbose="true">
15+
cacheDirectory=".phpunit.cache"
16+
beStrictAboutCoverageMetadata="true">
2117

22-
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
23-
<include>
24-
<directory suffix=".php">./src/</directory>
25-
</include>
26-
<exclude>
27-
<directory suffix=".php">./src/Commands/Generators</directory>
28-
<directory suffix=".php">./src/Commands/Utils</directory>
29-
<directory suffix=".php">./src/Config</directory>
30-
</exclude>
18+
<coverage includeUncoveredFiles="true">
3119
<report>
3220
<clover outputFile="build/phpunit/clover.xml"/>
3321
<html outputDirectory="build/phpunit/html"/>
@@ -44,27 +32,11 @@
4432
</testsuites>
4533

4634
<extensions>
47-
<extension class="Nexus\PHPUnit\Extension\Tachycardia">
48-
<arguments>
49-
<array>
50-
<element key="timeLimit">
51-
<double>0.50</double>
52-
</element>
53-
<element key="reportable">
54-
<integer>30</integer>
55-
</element>
56-
<element key="precision">
57-
<integer>2</integer>
58-
</element>
59-
<element key="collectBare">
60-
<boolean>true</boolean>
61-
</element>
62-
<element key="tabulate">
63-
<boolean>true</boolean>
64-
</element>
65-
</array>
66-
</arguments>
67-
</extension>
35+
<bootstrap class="Nexus\PHPUnit\Tachycardia\TachycardiaExtension">
36+
<parameter name="time-limit" value="0.50"/>
37+
<parameter name="report-count" value="30"/>
38+
<parameter name="format" value="table"/>
39+
</bootstrap>
6840
</extensions>
6941

7042
<logging>
@@ -100,4 +72,14 @@
10072
<env name="database.tests.DBPrefix" value="tests_"/>
10173
-->
10274
</php>
75+
<source>
76+
<include>
77+
<directory suffix=".php">./src/</directory>
78+
</include>
79+
<exclude>
80+
<directory suffix=".php">./src/Commands/Generators</directory>
81+
<directory suffix=".php">./src/Commands/Utils</directory>
82+
<directory suffix=".php">./src/Config</directory>
83+
</exclude>
84+
</source>
10385
</phpunit>

rector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
2828
use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector;
2929
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
30-
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
3130
use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
3231
use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\AnnotationWithValueToAttributeRector;
3332
use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DataProviderAnnotationToAttributeRector;
@@ -82,7 +81,6 @@
8281
$rectorConfig->skip([
8382
__DIR__ . '/app/Views',
8483

85-
JsonThrowOnErrorRector::class,
8684
StringifyStrNeedlesRector::class,
8785
YieldDataProviderRector::class,
8886

0 commit comments

Comments
 (0)