MNT Update phpunit xml file for phpunit 11 #11407
Merged
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.
Issue #11406
Needs silverstripe/gha-run-tests#40 merged and tagged first
phpunit xml file needs to be different for phpunit 11. Notably
<exclude>
can no longer be in<directory>
I tried this novel approach to mimic exclude, though it doesn't work
Since there's no way to actually exclude a subdirectory anymore via the xml file, I think we need to filter the testsuites in github actions. The other option is to move ORM tests into a totally different location, though I don't want to do that
I also ran the
--migrate-configuration
flag when running phpunit 11 to automatically fix another xml issue. Note that when running this it adds acacheDirectory=".phpunit.cache"
attribute which we do not want as this causes a cache dir in the root folder to be added which we don't want, so delete this attribute if running this on other modules. The xml file is valid without the cacheDirectory attribute