refactor(autoreview): Extract PHPUnit test analysis into a dedicated helper#3279
Conversation
|
@coderabbitai full reveiw |
|
✅ Action performedFull review finished. |
📝 WalkthroughWalkthroughThis PR refactors PHPUnit test detection in architecture tests by extracting integration-group identification from ChangesPHPUnit detection refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Future PHPat rules will need more PHPUnit-related information from PHPStan
ClassReflectionobjects.This PR takes the first step by extracting existing PHPUnit-specific checks into a reusable helper,
PHPUnitTestClassAnalysis. The goal is not to reduce much code immediately, but to make the intent explicit and keep the next behaviour changes small and easier to review.Changes
Adds
PHPUnitTestClassAnalysis, which:ClassReflectionrepresents a PHPUnit test case.#[Group('integration')]attribute parsing out ofPHPUnitTestIoRequirements.The PHPUnit test-case check is intentionally unchanged for now. It remains a small wrapper around the existing logic so that later fixes can be reviewed as behaviour changes, rather than being mixed into this extraction.
Reviewer Notes
This PR is intended as a refactor with no behaviour change.
This is a small step to untangle #3277 which itself is a PR made to untangle things. It's partly about refining the modelisation of our rules with PHPat and partly adjusting AI generated code I previously did not care as much about.