Skip to content

Conversation

OskarStark
Copy link
Contributor

@OskarStark OskarStark commented Sep 24, 2025

Q A
Bug fix? no
New feature? no
Docs? no
Issues Follows #647
License MIT

This rule prevents the use of Large, Small, Medium, CoversClass and UsesClass attributes in test files, helping maintain consistency in the test codebase by avoiding these coverage-related attributes.

The rule operates only on files ending with 'Test.php' and provides clear error messages with tips for resolving violations.

Proof

CleanShot 2025-09-24 at 07 18 01@2x

@OskarStark OskarStark changed the title [CI] Add PHPStan rule to forbid test coverage attributes [PHPStan] Add rule to forbid test coverage attributes Sep 24, 2025
@OskarStark OskarStark force-pushed the forbid-test-coverage-attributes branch from 048e2f7 to b8f4abe Compare September 24, 2025 05:41
@OskarStark OskarStark merged commit c0a09f9 into symfony:main Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants