Check that `#[Covers]` targets exist
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #224 của @alies-dev — đã merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Read the plugin's afterClassLikeVisit or afterClassLikeAnalysis flow and compare the linked phpstan-phpunit rules and CoversHelper. Add tests for docblock targets and CoversMethod/CoversFunction string arguments, confirming they report undefined targets without marking them as used. A pull request is already open for this issue, so check its scope and tests before taking it on.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
@covers \App\Invoce (typo) or @covers ::totl is silently accepted. Attribute forms like #[CoversClass(Missing::class)] are already reported by Psalm as UndefinedClass, but docblock targets and the string arguments of #[CoversMethod]/#[CoversFunction] are not checked.
phpstan-phpunit checks docblock targets (ClassCoversExistsRule, ClassMethodCoversExistsRule, CoversHelper). It doesn't handle attributes yet (phpstan/phpstan-phpunit#289).
Idea: in afterClassLikeVisit/afterClassLikeAnalysis, resolve @covers/@coversDefaultClass targets and the method/function names in #[CoversMethod]/#[CoversFunction], and report UndefinedClass/UndefinedMethod/UndefinedFunction. This only validates targets; it must not mark them as used (see #141). Docblock @covers is ignored by PHPUnit 12. Roughly 80 lines with tests.
Idea borrowed from phpstan/phpstan-phpunit.
- Ngôn ngữ chính
- Gherkin
- Star
- 79
- Fork
- 38
- Merge trung bình
- 3 giờ 54 phút
- Pull request đã merge (30 ngày)
- 68
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của psalm/psalm-plugin-phpunit
-
InvalidArgument for `new ArrayIterator(...)` datasets passed to invariant generic parametersĐang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
psalm/psalm-plugin-phpunit#274 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của psalm/psalm-plugin-phpunit
Issue tương tự
-
ci javascript tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jonathanong/no-mistakes#3258 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
nikic/PHP-Parser#1186 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
wultra/powerauth-tests#980 ·
-
area: cpu-engines area: fuzzer good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 91/100
hffgzktbcc-blip/ounce-core#402 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
swc-project/swc-ai-issues#432 ·