**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: Test annotations and coding style
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
] );
```
We have a MediaWiki CodeSniff which ensures that each test must have a `@covers` annotation, which will lead to errors when we replace them with attributes. The sniff does not recognize attributes. The sniff is also unneccessary, because PHPUnit can check for missing coverage attributes. Before upgrading to PHPUnit 11, make sure that
- The coding style is at least at version 10.1 (The release 10.1 removed the `@covers` sniff)
- The PHPUnit configuration has the attribute `requireCoverageMetadata="true"`
**Repo list**
- [ ] https://github.com/wmde/fundraising-application
- [ ] https://gitlab.com/fun-tech/fundraising-app-frontend
- [X] https://github.com/wmde/fundraising-donations
- [ ] 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
- [X] https://github.com/wmde/Clock
- [ ] https://github.com/wmde/email-address
- [ ] https://github.com/wmde/PsrLogTestDoubles