feat: add support for disabling Larastan - #105
Conversation
📝 WalkthroughWalkthroughThe Rector configuration now accepts an optional Larastan flag. The project configuration disables Larastan explicitly, while project PHPStan configuration remains the priority. ChangesLarastan configuration control
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/WorksomeRectorConfig.php (1)
22-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd regression coverage for both Larastan modes.
configure()now controls bothwithPHPStanConfigs()andwithBootstrapFiles(). Testlarastan: false, the default-enabled path, and precedence for an existing projectphpstan.neon.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/WorksomeRectorConfig.php` around lines 22 - 33, Add regression tests for WorksomeRectorConfig::configure covering larastan=false, the default larastan-enabled behavior, and an existing project phpstan.neon taking precedence over the Larastan extension config. Assert both withPHPStanConfigs and withBootstrapFiles outputs for each mode, using isolated filesystem fixtures where needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/WorksomeRectorConfig.php`:
- Around line 22-33: Add regression tests for WorksomeRectorConfig::configure
covering larastan=false, the default larastan-enabled behavior, and an existing
project phpstan.neon taking precedence over the Larastan extension config.
Assert both withPHPStanConfigs and withBootstrapFiles outputs for each mode,
using isolated filesystem fixtures where needed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1536a682-99b4-40e6-a2e2-71c65388791a
📒 Files selected for processing (2)
rector.phpsrc/WorksomeRectorConfig.php
Summary by CodeRabbit
New Features
Bug Fixes