[removal] Remove --kaizen option, as it might jump right to risky rules, use levels instead#7478
Merged
TomasVotruba merged 1 commit intomainfrom Oct 11, 2025
Merged
[removal] Remove --kaizen option, as it might jump right to risky rules, use levels instead#7478TomasVotruba merged 1 commit intomainfrom
TomasVotruba merged 1 commit intomainfrom
Conversation
…es, use levels instead
77aff5d to
83c0263
Compare
Member
|
/cc @VincentLanglet fyi |
Member
|
/cc @shakaran fyi |
samsonasik
reviewed
Oct 12, 2025
| return array_unique($filePaths); | ||
| } | ||
|
|
||
| return $toBeChangedFiles; |
Member
There was a problem hiding this comment.
directly returns $this->unchangedFilesFilter->filterFilePaths($filePaths) now can be applied, see:
as just directly returns array.
Member
Author
There was a problem hiding this comment.
We should have a rule for this :)
Member
There was a problem hiding this comment.
Yes, only when it return native type :)
Member
Author
There was a problem hiding this comment.
Any type would do, as:
X === [], return X, else return XSame as:
return X
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
4 months ago I added an experimental
--kaizenoption in #6876Goal was to allow gradually upgrade codebase, 1 rule at a time.
Now we have more data to access, whether to keep or remove the option.
In practice, this option goes against the level logic - https://getrector.com/documentation/levels
That means more risky rules were applied before less risky ones.
Saying that, instead of having 2 options to do the same, we'll stick with levels that clearly define safe path, one step at a time.
I'm removing this option, as it was not documented and marked as experimental.