-
Notifications
You must be signed in to change notification settings - Fork 23
Commit 5b45d93
PHPUnit: allow for PHPUnit 10 + add separate configuration
The PHPunit configuration file specification has undergone changes in PHPUnit 9.3, 10.0 and 10.1.
Most notably:
* In PHPUnit 9.3, the manner of specifying the code coverage configuration has changed.
* In PHPUnit 10.0, a significant number of attributes of the `<phpunit>` element were removed or renamed.
* In PHPUnit 10.1, there is another change related to the code coverage configuration + the ability to fail builds on deprecations/warnings/notices is brought back.
While the `--migrate-configuration` command can upgrade a configuration for the changes in the format made in PHPUnit 9.3, some of the changes in the configuration format in PHPUnit 10 don't have one-on-one replacements and/or are not taken into account.
As this package is used in the CI pipeline for other packages, it is important for this package to be ready for new PHP releases _early_, so failing the test suite on deprecatios/notices and warnings is appropriate.
With that in mind, I deem it more appropriate to have a dedicated PHPUnit configuration file for PHPUnit 10 to ensure the test run will behave as intended.
This commit adds this dedicated configuration file for PHPUnit 10.1+.
Includes:
* Ignoring the new file for package archives.
* Allowing for a local override file.
* Adding scripts to the `composer.json` file to run the tests using this new configuration file and make the use of the separate config make more obvious for contributors.
* Updating the GH Actions `test` workflow to trigger the tests on PHPUnit 10 with this configuration file.
Ref:
* https://github.com/sebastianbergmann/phpunit/blob/main/ChangeLog-10.0.md#1000---2023年02月03日
* sebastianbergmann/phpunit 5196
* sebastianbergmann/phpunit@fb6673f 1 parent 1142c60 commit 5b45d93
File tree
5 files changed
+69
-14
lines changed- .github/workflows
5 files changed
+69
-14
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 | - | ||
9 | - | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
14 | - | ||
15 | - | ||
16 | - | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
155 | - | ||
155 | + | ||
156 | + | ||
157 | + | ||
158 | + | ||
159 | + | ||
160 | + | ||
156 | 161 |
| |
157 | 162 |
| |
163 | + | ||
164 | + | ||
165 | + | ||
166 | + | ||
158 | 167 |
| |
159 | 168 |
| |
160 | 169 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 | - | ||
29 | + | ||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 | - | ||
57 | + | ||
58 | + | ||
59 | + | ||
58 | 60 |
| |
59 | 61 |
| |
60 | - | ||
61 | - | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | ||
62 | 66 |
| |
63 | 67 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + |
0 commit comments