Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ClassCoversExistsRule and ClassMethodCoversExistsRule do not support attributes

Open
#289 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
testing

Research direction

Locate ClassCoversExistsRule and ClassMethodCoversExistsRule, then read the PHPUnit attributes documentation linked in the issue for the expected CoversClass and CoversMethod behavior. Implement support for those attributes and verify that the related documentation update can be merged.

Written by the indexing model from the issue text.

Description

These rules should read #[CoversClass] and #[CoversMethod].

Maybe there are opportunities for more rules as well: https://docs.phpunit.de/en/13.0/attributes.html#code-coverage

Once implemented, we can merge this docs update: https://github.com/phpstan/phpstan/pull/14346

Dominant language
PHP
Stars
544
Forks
58
Avg merge
2d 1h
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from phpstan/phpstan-phpunit

All issues in phpstan/phpstan-phpunit

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.