Skip to content

Commit eeed5fe

Browse files
authored
Merge pull request #22 from 1stthomas/fix-phpunit-config-desc
Update PHPUnit config description
2 parents 642203b + d3d24f2 commit eeed5fe

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

README.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,29 @@ Basic configuration for the checkout action works like this:
2222
```
2323
IMPORTANT: v1.0.0 currently has NO support for a custom checkout path.
2424

25-
You can automatically generate a clover report file with every PHPUnit run by adding the following configuration to your phpunit.xml file:
25+
You can automatically generate a clover report file with every PHPUnit run by adding specific configuration to your phpunit.xml file. For PHPUnit v9 use something like following:
26+
```xml
27+
<coverage cacheDirectory=".phpunit.cache/code-coverage" processUncoveredFiles="true">
28+
<include>
29+
<directory suffix=".php">src</directory>
30+
</include>
31+
<report>
32+
<clover outputFile="clover.xml" />
33+
</report>
34+
</coverage>
2635
```
27-
<coverage cacheDirectory=".phpunit.cache/code-coverage" processUncoveredFiles="true">
28-
<include>
29-
<directory suffix=".php">src</directory>
30-
</include>
31-
<report>
32-
<clover outputFile="clover.xml" />
33-
</report>
34-
</coverage>
36+
Since PHPUnit v10.1 file and folder filtering must be declared with a `source` element:
37+
```xml
38+
<coverage includeUncoveredFiles="true">
39+
<report>
40+
<clover outputFile="clover.xml" />
41+
</report>
42+
</coverage>
43+
<source>
44+
<include>
45+
<directory suffix=".php">src</directory>
46+
</include>
47+
</source>
3548
```
3649

3750
# Recommended configuration

0 commit comments

Comments
 (0)