Tests: add separate configuration file for PHPUnit 10 #111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The configuration file specification has undergone changes in PHPUnit 9.3 and 10.0.
Most notably:
<phpunit>
element were removed or renamed.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.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+.
Includes:
composer.json
file to run the tests using this new configuration file.test
workflow to trigger the tests on PHPUnit 10 with this configuration file.Take note that the
cacheDirectory
option has been set to the same value as PHPUnit natively already used in PHPUnit 8 and 9, even though this is a different value as is used by default in PHPUnit 10.Ref: