**Acceptance Criteria**
- All of our repositories use PHPUnit 11
**Implementation details**
Before you can change the composer requirement from 10 to 11, you have to change two other things: coding style and annotations.
Converting the annotations to attributes means that the MediaWiki CodeSniff which ensures that each test must have a `@covers` annotation, will break. {T329048} tracks this, but until that ticket is resolved we have to disable the `MediaWiki.Commenting.MissingCovers.MissingCovers` sniff in our [[ https://github.com/wmde/fundraising-phpcs/blob/main/WMDE/Fundraising/ruleset.xml | code style ]] and release a new version of the coding style before upgrading to PHPUnit.
PHPUnit 11 removes annotation support (`@covers` tags in docblocks). Before you upgrade to PHPUnit 11, you have to convert the PHPUnit annotations to attributes. You can use a pre-built [Rector Fix](https://github.com/rectorphp/rector-phpunit) for that:
1. Add `"rector/rector":"~1.0"` as a composer dev dependency
2. Add the `rector.php` config file to the project root (see below)
3. run `vendor/bin/rector process tests` (to run it in docker, run `docker compose run --no-deps app php vendor/bin/rector process tests`
4. Fix the coding style
5. Commit the changes in the `tests/` folder, **dot not** commit rector.php or the rector dev dependency!
```
// rector.php
use Rector\Config\RectorConfig;
use Rector\PHPUnit\Set\PHPUnitSetList;
return RectorConfig::configure()
->withSets( [
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES
] );
```
**Repo list**
- [ ] https://github.com/wmde/fundraising-application
- [ ] https://gitlab.com/fun-tech/fundraising-app-frontend
- [ ] https://github.com/wmde/fundraising-donations - https://github.com/wmde/fundraising-donations/pull/242
- [ ] https://github.com/wmde/fundraising-memberships
- [ ] https://github.com/wmde/fundraising-address-change
- [ ] https://github.com/wmde/fundraising-subscriptions
- [ ] https://github.com/wmde/fundraising-payments
- [ ] https://github.com/wmde/fun-validators
- [ ] https://github.com/wmde/fundraising-content-provider/
- [ ] https://github.com/wmde/fundraising-backend
- [ ] https://github.com/wmde/banner-server
- [ ] https://github.com/wmde/Euro
- [ ] https://github.com/wmde/Clock
- [ ] https://github.com/wmde/email-address
- [ ] https://github.com/wmde/PsrLogTestDoubles