The #[CoversClass]
and #[UsesClass]
attributes can no longer target traits
#5798
Labels
feature/code-coverage
Issues related to code coverage (but not php-code-coverage)
feature/metadata/attributes
type/bug
Something is broken
version/11
Something affects PHPUnit 11
Prior to PHPUnit 11.1, the
#[CoversClass]
and#[UsesClass]
attributes could target traits. This was not intentional, which is why there were no tests covering this behaviour. This behaviour was broken while working on #5733 and this breakage was only noticed after the release: Roave/BetterReflection#1420 (comment).The text was updated successfully, but these errors were encountered: