You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: update to use PHPStan Extension Installer - #108
PHPStan now automatically discovers and loads supported extension configurations.
Optional Laravel analysis rules are enabled when the relevant Laravel analysis packages are installed, with stricter checks available when both packages are present.
Rector can use discovered PHPStan extensions and conditionally apply Laravel support.
Bug Fixes
PHPUnit usage checks now correctly account for abstract and anonymous classes.
Documentation
Added setup guidance, including a warning about duplicate PHPStan configuration includes.
The package now registers PHPStan configuration through Composer’s extension installer, conditionally loads Larastan configurations, and exposes discovered extension configurations to Rector. The Larastan strict rules use a separate configuration. DisallowPHPUnitRule now uses PHPStan class reflection to identify eligible classes and PHPUnit subclasses.
Composer registers the PHPStan extension installer and makes Larastan packages optional development dependencies. The extension configuration conditionally includes Larastan rules. The strict-rules settings are in a separate configuration. The README describes the setup and duplicate-inclusion warning.
Load discovered extensions in Rector src/WorksomeRectorConfig.php, rector.php, stubs/phpstan.neon.stub
Rector collects include paths from registered PHPStan extensions and adds the Larastan bootstrap when the extension is registered. The Rector entry point and PHPStan stub no longer explicitly include Larastan configuration.
PHPUnit class detection
Layer / File(s)
Summary
Use reflection for PHPUnit class detection src/PHPStan/DisallowPHPUnitRule.php
The rule targets InClassNode and uses reflection to skip abstract or anonymous classes and check for PHPUnit test subclasses.
Fix the failing style check before merging. Deployments that move an installed vendor tree may also be unable to start Rector until its extension paths are resolved relative to the installation.
Finishing Touches
📝 Generate docstrings
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.