refactor custom rector rule namespaces to be major cake version specific#358
Merged
refactor custom rector rule namespaces to be major cake version specific#358
Conversation
LordSimal
commented
Nov 17, 2025
|
|
||
| namespace Cake\Upgrade\Rector\Set; | ||
|
|
||
| final class CakePHPLevelSetList |
Contributor
Author
There was a problem hiding this comment.
I found absolutely no references to this class, so I removed it as the CakePHPSetList.php is actually the one used in our config files.
Contributor
Author
|
Those failures for 8.1, 8.3 and 8.4 are unrelated to this change as they happen in current 6.x as well. |
92c4e0f to
2efea61
Compare
2efea61 to
ce99063
Compare
LordSimal
added a commit
that referenced
this pull request
Jan 6, 2026
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.
This is my desired new code structure for how the upgrade tool should be continued
Base Rule: New custom rector rules are placed inside
src/Rector/CakeX/SomethingNewRector.phpIf a new rector rules needs custom value objects then it should be
src/Rector/CakeX/SomethingNew/SomethingNewRector.phpsrc/Rector/CakeX/SomethingNew/SomethingNew.phpThe
CakeXis always the first major version of the CakePHP version this applies to. If a rule is so generic that it can be apllied to multiple majors, just keep it in the first one where it has been added to the config.We do NOT split rector rules up by minor versions as we - currently - don't have that many custom rector rules per major to justify this.