Skip to content

Conversation

@LordSimal
Copy link
Contributor

@LordSimal LordSimal commented Nov 17, 2025

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.php

If a new rector rules needs custom value objects then it should be

  • src/Rector/CakeX/SomethingNew/SomethingNewRector.php
  • src/Rector/CakeX/SomethingNew/SomethingNew.php

The CakeX is 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.

image


namespace Cake\Upgrade\Rector\Set;

final class CakePHPLevelSetList
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

@LordSimal
Copy link
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.
Will have to look into this as I can't reproduce that locally.

@LordSimal LordSimal merged commit 32cf8a7 into 6.x Nov 21, 2025
5 of 6 checks passed
@LordSimal LordSimal deleted the 6.x-refactor branch November 21, 2025 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants