Skip to content

Commit 0770bc1

Browse files
committed
Update to PHPUnit 10, add PHP HTTP-Plug support
1 parent 7ae60ad commit 0770bc1

File tree

3 files changed

+27
-30
lines changed

3 files changed

+27
-30
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
/vendor/
88
/.phpunit.cache/
99
/coverage/
10+
11+
# PHPUnit ignores
12+
.phpunit.result.cache

composer.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,19 @@
2727
"ext-zip": "*",
2828
"ext-zlib": "*",
2929
"composer/composer": "^2.7.0",
30+
"php-http/discovery": "^1.0",
31+
"php-http/httplug": "^2.0",
32+
"php-http/message-factory": "^1.0",
33+
"psr/http-client-implementation": "^1.0",
34+
"psr/http-message": "^1.0",
3035
"symfony/process": "^4.3.4 || ^5.0 || ^6.0"
3136
},
3237
"require-dev": {
33-
"dms/phpunit-arraysubset-asserts": "^0.4.0",
38+
"nyholm/psr7": "^1.8",
39+
"symfony/http-client": "^7.0",
40+
"php-http/message": "^1.0",
3441
"phpstan/phpstan": "^1.6",
35-
"phpunit/phpunit": "^8.5.15 || ^9.5.4",
36-
"symfony/phpunit-bridge": "^4.3.4 || ^5.0 || ^6.0"
42+
"phpunit/phpunit": "^10.5"
3743
},
3844
"autoload": {
3945
"psr-4": {
@@ -51,6 +57,9 @@
5157
"prefer-stable": true,
5258
"minimum-stability": "dev",
5359
"config": {
54-
"sort-packages": true
60+
"sort-packages": true,
61+
"allow-plugins": {
62+
"php-http/discovery": true
63+
}
5564
}
5665
}

phpunit.xml.dist

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
5-
bootstrap="vendor/autoload.php"
6-
cacheResultFile=".phpunit.cache/test-results"
7-
executionOrder="depends,defects"
8-
forceCoversAnnotation="true"
9-
beStrictAboutCoversAnnotation="true"
10-
beStrictAboutOutputDuringTests="true"
11-
beStrictAboutTodoAnnotatedTests="true"
12-
failOnWarning="true"
13-
>
14-
<testsuites>
15-
<testsuite name="Test Suite">
16-
<directory suffix="Test.php">tests</directory>
17-
</testsuite>
18-
</testsuites>
19-
20-
<coverage
21-
cacheDirectory=".phpunit.cache/code-coverage"
22-
processUncoveredFiles="true"
23-
>
24-
<include>
25-
<directory suffix=".php">src</directory>
26-
</include>
27-
</coverage>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" executionOrder="depends,defects" beStrictAboutOutputDuringTests="true" failOnWarning="true" cacheDirectory=".phpunit.cache" requireCoverageMetadata="true" beStrictAboutCoverageMetadata="true">
3+
<testsuites>
4+
<testsuite name="Test Suite">
5+
<directory suffix="Test.php">tests</directory>
6+
</testsuite>
7+
</testsuites>
8+
<source>
9+
<include>
10+
<directory suffix=".php">src</directory>
11+
</include>
12+
</source>
2813
</phpunit>

0 commit comments

Comments
 (0)