Skip to content

Conversation

@LordSimal
Copy link
Contributor

Refs: #309

@LordSimal LordSimal force-pushed the 6.x-remove-underscore-from-methods branch from 9a6d52f to 5026929 Compare May 27, 2025 10:54
@LordSimal LordSimal marked this pull request as ready for review May 29, 2025 14:16
@LordSimal LordSimal force-pushed the 6.x-remove-underscore-from-methods branch from 8f5b45c to 3d75cf2 Compare May 30, 2025 13:18
}
$process = Process::fromShellCommandline($command);
$process->setEnv($_ENV);
$process->setTimeout(null);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The symfony process utility has a default 60 second timeout for commands it runs. Since it can take way longer for rector to finish this is the best way to go.

composer.json Outdated
"cakephp/console": "^5.1.5",
"nette/utils": "^4.0",
"rector/rector": "dev-main",
"symfony/process": "^5.4|^6.0|^7.0",
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 guess we can drop 5.4 here since cake 5 requires php 8+

Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

I think if we're going to do these kinds of refactors this is the best way to do it.

return static::CODE_ERROR;
}
$io->success('Rector applied successfully');
$io->success('🎉 Upgrade complete! 🎉');
Copy link
Member

Choose a reason for hiding this comment

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

Very nice 👏

'Cake\View\Widget\RadioWidget' => ['_renderInput', '_renderLabel', '_isDisabled'],
'Cake\View\Widget\CheckboxWidget' => ['_isChecked'],
'Cake\View\Widget\WidgetLocator' => ['_resolveWidget'],
],
Copy link
Member

Choose a reason for hiding this comment

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

Wow that is quite the list 👏

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 hope you now understand why i want to make these changes 😁

@LordSimal LordSimal merged commit f0551ad into 6.x May 31, 2025
3 checks passed
@LordSimal LordSimal deleted the 6.x-remove-underscore-from-methods branch May 31, 2025 09:11
LordSimal added a commit that referenced this pull request Jan 6, 2026
* remove underscores from collection package methods via rector

* remove underscores from command package methods via rector

* remove underscores from console package methods via rector

* remove underscores from controller package methods via rector

* remove underscores from core package methods via rector

* refactor static return type config

* re-add trait methods for cake6 config

* adjust SimpleStaticType config

* remove underscores from database package methods via rector

* remove underscores from datasource package methods via rector

* remove underscores from error package methods via rector

* remove underscores from event package methods via rector

* remove underscores from form package methods via rector

* remove underscores from http package methods via rector

* remove underscores from I18N package methods via rector

* remove underscores from Log package methods via rector

* remove underscores from mailer package methods via rector

* remove underscores from network package methods via rector

* remove underscores from orm package methods via rector

* remove underscores from routing package methods via rector

* remove underscores from testsuite package methods via rector

* remove underscores from utility package methods via rector

* remove underscores from validation package methods via rector

* remove underscores from view package methods via rector

* add symfony process as a command wrapper for rector

* fix tests with wrong assumptions about --dry-run rector exit codes

* use tagged version of rector

* adjust symfony/process dependency range
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.

3 participants