Skip to content

Commit c0d8315

Browse files
authored
Added support for PHPUnit v10 (#12)
1 parent d3633f8 commit c0d8315

File tree

4 files changed

+25
-21
lines changed

4 files changed

+25
-21
lines changed

.github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@ jobs:
7676
redis_version: '6.0'
7777
php_versions: '8.1'
7878
laravel: '^9.0'
79+
experimental: false
7980
- operating_system: ubuntu-latest
8081
redis_version: '6.0'
8182
php_versions: '8.2'
8283
laravel: '^10.0'
84+
experimental: false
8385
runs-on: '${{ matrix.operating_system }}'
8486
services:
8587
redis:
@@ -135,7 +137,7 @@ jobs:
135137
REDIS_HOST: 127.0.0.1
136138
REDIS_PORT: 6379
137139
run: |
138-
./vendor/bin/phpunit --verbose --stderr --configuration phpunit.github.xml --coverage-clover build/logs/clover.xml --coverage-text
140+
./vendor/bin/phpunit --stderr --configuration phpunit.github.xml --coverage-clover build/logs/clover.xml --coverage-text
139141
working-directory: './'
140142
- name: Upload coverage results to Coveralls
141143
if: ${{ !matrix.experimental }}

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"require-dev": {
4040
"umbrellio/code-style-php": "^1.0",
41-
"phpunit/phpunit": "^8.3|^9.0",
41+
"phpunit/phpunit": "^8.3|^9.0|^10.0",
4242
"php-coveralls/php-coveralls": "^2.1",
4343
"symplify/easy-coding-standard": "^9.3.15",
4444
"orchestra/testbench": "^7.0|^8.0"

phpunit.github.xml

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="vendor/autoload.php"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
bootstrap="vendor/autoload.php"
34
colors="true"
4-
convertErrorsToExceptions="true"
5-
convertNoticesToExceptions="false"
6-
convertWarningsToExceptions="false"
75
processIsolation="false"
8-
stopOnFailure="false">
6+
stopOnFailure="false"
7+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
8+
cacheDirectory=".phpunit.cache"
9+
>
10+
<coverage>
11+
<include>
12+
<directory suffix=".php">./src</directory>
13+
</include>
14+
</coverage>
915
<testsuites>
1016
<testsuite name="Test suite">
1117
<directory suffix="Test.php">./tests</directory>
1218
</testsuite>
1319
</testsuites>
14-
<filter>
15-
<whitelist processUncoveredFilesFromWhitelist="true">
16-
<directory suffix=".php">./src</directory>
17-
</whitelist>
18-
</filter>
1920
</phpunit>

phpunit.xml.dist

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="vendor/autoload.php"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
bootstrap="vendor/autoload.php"
34
colors="true"
4-
convertErrorsToExceptions="true"
5-
convertNoticesToExceptions="true"
6-
convertWarningsToExceptions="true"
75
processIsolation="false"
8-
stopOnFailure="false">
9-
<filter>
10-
<whitelist processUncoveredFilesFromWhitelist="true">
6+
stopOnFailure="false"
7+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
8+
cacheDirectory=".phpunit.cache"
9+
>
10+
<coverage>
11+
<include>
1112
<directory suffix=".php">./src</directory>
12-
</whitelist>
13-
</filter>
13+
</include>
14+
</coverage>
1415
<testsuites>
1516
<testsuite name="Test suite">
1617
<directory suffix="Test.php">./tests</directory>

0 commit comments

Comments
 (0)