phpunit-11-noteslisted
Install: claude install-skill hmj1026/dhpk
# PHPUnit 11 — attributes only, PHP 8.2 floor
Released February 2024. **PHP 8.2+ floor**. The big change from 10:
**doc-comment annotations are fully removed** — every test-metadata
declaration must use a PHP 8 attribute.
> If you're on PHPUnit 10 with doc-comment annotations, migrate to
> attributes *before* bumping to 11. The migration is mechanical and
> can be automated, but skipping it produces silent test loss
> (annotations are ignored → providers don't run → "0 tests").
---
## Doc-comment annotations: gone
Every annotation listed in the phpunit-10-notes skill's attribute
table is now **the only option**. The `@dataProvider`, `@covers`,
`@group`, `@depends`, `@requires` and friends no longer do anything
in 11.
```php
// 10 (deprecated): annotation works
/** @dataProvider priceCases */
public function testWithTax($cents, $expected) { /* ... */ }
// 11 (required): attribute or test silently has no provider
#[DataProvider('priceCases')]
public function testWithTax(int $cents, int $expected): void { /* ... */ }
```
### Migration grep
Before bumping:
```bash
grep -rEn '@(dataProvider|covers|coversNothing|uses|group|depends|requires|testdox|backupGlobals|runInSeparateProcess|preserveGlobalState)' tests/
```
Each match needs an attribute conversion. PHPUnit's official
`vendor/bin/phpunit --migrate-configuration` doesn't touch test source
code — only `phpunit.xml`. For test source migration, use either:
- The `rector/rector` ruleset `PHPUnitCodeQualityLevel::UP_TO_