Skip to content

feat: add support for disabling Larastan - #105

Merged
owenvoke merged 1 commit into
mainfrom
feature/larastan-disabled
Aug 5, 2026
Merged

feat: add support for disabling Larastan#105
owenvoke merged 1 commit into
mainfrom
feature/larastan-disabled

Conversation

@owenvoke

@owenvoke owenvoke commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added an option to enable or disable Larastan integration when configuring the code analysis setup.
    • Larastan remains enabled by default for existing configurations.
  • Bug Fixes

    • Improved configuration handling when Larastan is explicitly disabled.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Rector configuration now accepts an optional Larastan flag. The project configuration disables Larastan explicitly, while project PHPStan configuration remains the priority.

Changes

Larastan configuration control

Layer / File(s) Summary
Configure optional Larastan support
src/WorksomeRectorConfig.php
configure accepts a Larastan flag and conditionally loads Larastan configuration and bootstrap files.
Disable Larastan for the project
rector.php
The project passes larastan: false to the Rector configuration.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding support to disable Larastan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/larastan-disabled

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@owenvoke
owenvoke merged commit 3baa19e into main Aug 5, 2026
5 of 6 checks passed
@owenvoke
owenvoke deleted the feature/larastan-disabled branch August 5, 2026 12:07

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/WorksomeRectorConfig.php (1)

22-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add regression coverage for both Larastan modes.

configure() now controls both withPHPStanConfigs() and withBootstrapFiles(). Test larastan: false, the default-enabled path, and precedence for an existing project phpstan.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

📥 Commits

Reviewing files that changed from the base of the PR and between c016ddf and 147f6c3.

📒 Files selected for processing (2)
  • rector.php
  • src/WorksomeRectorConfig.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant