-
Notifications
You must be signed in to change notification settings - Fork 3
Fix rector-migrate.php to allow user-specified paths #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Remove hardcoded withPaths() configuration that pointed to vendor directory. Users now specify their project paths via command line: vendor/bin/rector process src --config=vendor/ray/psr-cache-module/rector-migrate.php
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR refactors the rector-migrate.php configuration by removing the hardcoded withPaths call so that users can supply their own migration paths via the CLI, and ensures the file’s header usage instructions remain accurate. Flow diagram for user-specified migration paths in rector-migrate.phpflowchart TD
A["User runs rector command with custom paths"] --> B["rector-migrate.php configuration loaded"]
B --> C["No hardcoded paths in configuration"]
C --> D["Rector processes user-specified paths"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
WalkthroughRemoved the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
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 |
|
@coderabbitai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Actions performedReview triggered.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 1.x #32 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 38 38
===========================================
Files 24 24
Lines 90 90
===========================================
Hits 90 90 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Fixed
rector-migrate.phpconfiguration to allow users to specify their own project paths via command line instead of hardcoded vendor paths.Problem
The previous configuration had
withPaths([__DIR__ . '/src', __DIR__ . '/tests'])which pointed to:vendor/ray/psr-cache-module/srcvendor/ray/psr-cache-module/testsThis was incorrect because users want to migrate their own code, not the vendor package code.
Solution
Removed the
withPaths()configuration entirely. Users now specify paths on the command line:Changes
withPaths()fromrector-migrate.phpThis follows the pattern from Ray.AuraSqlModule's rector-migrate.php.
Summary by Sourcery
Remove hardcoded paths from rector-migrate.php so users can specify their own source and test directories via command-line arguments instead of defaulting to vendor package code
Bug Fixes:
Enhancements:
Summary by CodeRabbit