Skip to content

update cake6 rector config to cleanup underscore prefixes - #411

Merged
LordSimal merged 1 commit into
6.xfrom
6.x-update-config
Sep 26, 2026
Merged

LordSimal merged 1 commit into
6.xfrom
6.x-update-config

Conversation

@LordSimal

Copy link
Copy Markdown
Member

These are the updated underscore prefixed properties and methods, which didn't have a rector rule yet.

Tested it with current 5.x state of cakephp/cakephp and after applying the rector it didn't find any definitions anymore.

@LordSimal LordSimal added this to the 6.x milestone Sep 26, 2026
],
'Console' => [
'Cake\Console\Helper\TableHelper' => ['_defaultConfig'],
'Cake\Console\Helper\TreeHelper' => ['_defaultConfig'],

@LordSimal LordSimal Sep 26, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In a past version of rector this wasn't necessary, as a rule to rename all properties inside classes using InstanceConfigTrait was fine.

But this seems to have been removed along the way and since we don't have that property in the trait itself - just the classes using the trait - we have to declare each class separately.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@samsonasik or is this a bug? 😁

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hm..., probably, could you point what rule you're using and if that's valid bug, report at

https://github.com/rectorphp/rector/issues

Thank you.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@LordSimal
LordSimal merged commit 3016aa5 into 6.x Sep 26, 2026
5 checks passed
@LordSimal
LordSimal deleted the 6.x-update-config branch September 26, 2026 12:29
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