fix(rector): AssertEqualsToSameRector の二重登録を削除#6936
Conversation
- PHPUnitSetList::PHPUNIT_CODE_QUALITY セットに含まれるため withRules での明示登録は不要 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughRector設定から ChangesRectorルール設定の削除
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.4 #6936 +/- ##
==========================================
+ Coverage 75.21% 75.78% +0.57%
==========================================
Files 493 545 +52
Lines 25005 27094 +2089
==========================================
+ Hits 18808 20534 +1726
- Misses 6197 6560 +363
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
概要(Overview・Refs Issue)
rector.phpでAssertEqualsToSameRectorが二重に登録されていたため、明示登録側を削除します。withRules()にAssertEqualsToSameRector::classを明示登録しているwithSets()のPHPUnitSetList::PHPUNIT_CODE_QUALITY(config/sets/phpunit-code-quality.php)にも同じルールが含まれているセット側に含まれているため、明示登録は冗長です。
方針(Policy)
PHPUNIT_CODE_QUALITY)に一本化し、設定の重複を解消する。実装に関する補足(Appendix)
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertEqualsToSameRector;も併せて削除。PHPUNIT_CODE_QUALITYにルールが含まれることの根拠:vendor/rector/rector/vendor/rector/rector-phpunit/config/sets/phpunit-code-quality.php($rectorConfig->rules([...])内にAssertEqualsToSameRector::class)。テスト(Test)
rector.php)のみの変更で、src/testsのコードには影響なし。vendor/bin/rector process --dry-run --config=rector.phpで変換結果が変わらないことを確認。相談(Discussion)
特になし。
マイナーバージョン互換性保持のための制限事項チェックリスト
🤖 Generated with Claude Code
Summary by CodeRabbit
assertEqualsをassertSameへ自動変換しないようにしました。