Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 83c02bc

Browse files
committed
move to PHP 8.1 and PHPUnit 10
1 parent e5ca83d commit 83c02bc

File tree

2 files changed

+73
-95
lines changed

2 files changed

+73
-95
lines changed

‎composer.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,13 @@
1818
],
1919
"homepage": "https://github.com/codeigniter4/tasks",
2020
"require": {
21-
"php": "^7.4 || ^8.0",
21+
"php": "^8.1",
2222
"ext-json": "*",
2323
"codeigniter4/settings": "^2.0"
2424
},
2525
"require-dev": {
26-
"codeigniter/coding-standard": "1.7.*",
27-
"codeigniter4/devkit": "^1.0",
28-
"codeigniter4/framework": "^4.1",
29-
"phpunit/phpunit": "^9.6",
30-
"rector/rector": "1.2.10"
26+
"codeigniter4/devkit": "^1.3",
27+
"codeigniter4/framework": "^4.1"
3128
},
3229
"minimum-stability": "dev",
3330
"prefer-stable": true,

‎phpunit.xml.dist

Lines changed: 70 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,83 @@
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"
4-
bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
5-
backupGlobals="false"
6-
beStrictAboutCoversAnnotation="true"
7-
beStrictAboutOutputDuringTests="true"
8-
beStrictAboutTodoAnnotatedTests="true"
9-
colors="true"
10-
convertErrorsToExceptions="true"
11-
convertNoticesToExceptions="true"
12-
convertWarningsToExceptions="true"
13-
executionOrder="random"
14-
failOnRisky="true"
15-
failOnWarning="true"
16-
stopOnError="false"
17-
stopOnFailure="false"
18-
stopOnIncomplete="false"
19-
stopOnSkipped="false"
20-
verbose="true">
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4+
bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
5+
backupGlobals="false"
6+
beStrictAboutOutputDuringTests="true"
7+
colors="true"
8+
executionOrder="random"
9+
failOnRisky="true"
10+
failOnWarning="true"
11+
stopOnError="false"
12+
stopOnFailure="false"
13+
stopOnIncomplete="false"
14+
stopOnSkipped="false"
15+
cacheDirectory="build/.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/Config</directory>
28-
<directory suffix=".php">./src/Views</directory>
29-
</exclude>
30-
<report>
31-
<clover outputFile="build/phpunit/clover.xml"/>
32-
<html outputDirectory="build/phpunit/html"/>
33-
<php outputFile="build/phpunit/coverage.serialized"/>
34-
<text outputFile="php://stdout" showUncoveredFiles="false"/>
35-
<xml outputDirectory="build/phpunit/xml-coverage"/>
36-
</report>
37-
</coverage>
18+
<coverage includeUncoveredFiles="true">
19+
<report>
20+
<clover outputFile="build/phpunit/clover.xml"/>
21+
<html outputDirectory="build/phpunit/html"/>
22+
<php outputFile="build/phpunit/coverage.serialized"/>
23+
<text outputFile="php://stdout" showUncoveredFiles="false"/>
24+
<xml outputDirectory="build/phpunit/xml-coverage"/>
25+
</report>
26+
</coverage>
3827

39-
<testsuites>
40-
<testsuite name="main">
41-
<directory>./tests</directory>
42-
</testsuite>
43-
</testsuites>
28+
<testsuites>
29+
<testsuite name="main">
30+
<directory>./tests</directory>
31+
</testsuite>
32+
</testsuites>
4433

45-
<extensions>
46-
<extension class="Nexus\PHPUnit\Extension\Tachycardia">
47-
<arguments>
48-
<array>
49-
<element key="timeLimit">
50-
<double>0.50</double>
51-
</element>
52-
<element key="reportable">
53-
<integer>30</integer>
54-
</element>
55-
<element key="precision">
56-
<integer>2</integer>
57-
</element>
58-
<element key="collectBare">
59-
<boolean>true</boolean>
60-
</element>
61-
<element key="tabulate">
62-
<boolean>true</boolean>
63-
</element>
64-
</array>
65-
</arguments>
66-
</extension>
67-
</extensions>
34+
<extensions>
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>
40+
</extensions>
6841

69-
<logging>
70-
<testdoxHtml outputFile="build/phpunit/testdox.html"/>
71-
<testdoxText outputFile="build/phpunit/testdox.txt"/>
72-
<junit outputFile="build/phpunit/junit.xml"/>
73-
</logging>
42+
<logging>
43+
<testdoxHtml outputFile="build/phpunit/testdox.html"/>
44+
<testdoxText outputFile="build/phpunit/testdox.txt"/>
45+
<junit outputFile="build/phpunit/junit.xml"/>
46+
</logging>
7447

75-
<php>
76-
<env name="XDEBUG_MODE" value="coverage"/>
77-
<server name="app.baseURL" value="https://example.com/"/>
48+
<php>
49+
<env name="XDEBUG_MODE" value="coverage"/>
50+
<server name="app.baseURL" value="https://example.com/"/>
7851

79-
<!-- Directory containing phpunit.xml -->
80-
<const name="HOMEPATH" value="./"/>
52+
<!-- Directory containing phpunit.xml -->
53+
<const name="HOMEPATH" value="./"/>
8154

82-
<!-- Directory containing the Paths config file -->
83-
<const name="CONFIGPATH" value="./vendor/codeigniter4/framework/app/Config/"/>
55+
<!-- Directory containing the Paths config file -->
56+
<const name="CONFIGPATH" value="vendor/codeigniter4/framework/app/Config/"/>
8457

85-
<!-- Directory containing the front controller (index.php) -->
86-
<const name="PUBLICPATH" value="./vendor/codeigniter4/framework/public/"/>
58+
<!-- Directory containing the front controller (index.php) -->
59+
<const name="PUBLICPATH" value="./public/"/>
8760

88-
<!-- https://getcomposer.org/xdebug -->
89-
<env name="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
61+
<!-- https://getcomposer.org/xdebug -->
62+
<env name="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
9063

91-
<!-- Database configuration -->
92-
<env name="database.tests.strictOn" value="true"/>
93-
<!-- Uncomment to use alternate testing database configuration
94-
<env name="database.tests.hostname" value="localhost"/>
95-
<env name="database.tests.database" value="tests"/>
96-
<env name="database.tests.username" value="tests_user"/>
97-
<env name="database.tests.password" value=""/>
98-
<env name="database.tests.DBDriver" value="MySQLi"/>
99-
<env name="database.tests.DBPrefix" value="tests_"/>
100-
-->
101-
</php>
64+
<!-- Database configuration -->
65+
<env name="database.tests.strictOn" value="true"/>
66+
<!-- Uncomment to use alternate testing database configuration
67+
<env name="database.tests.hostname" value="localhost"/>
68+
<env name="database.tests.database" value="tests"/>
69+
<env name="database.tests.username" value="tests_user"/>
70+
<env name="database.tests.password" value=""/>
71+
<env name="database.tests.DBDriver" value="MySQLi"/>
72+
<env name="database.tests.DBPrefix" value="tests_"/>
73+
-->
74+
</php>
75+
<source>
76+
<include>
77+
<directory suffix=".php">./src/</directory>
78+
</include>
79+
<exclude>
80+
<directory suffix=".php">./src/Config</directory>
81+
</exclude>
82+
</source>
10283
</phpunit>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /