fix possible rector internal timeout when processing large apps#406
Merged
Conversation
samsonasik
reviewed
Jun 30, 2026
| use Rector\Config\RectorConfig; | ||
|
|
||
| return static function (RectorConfig $rectorConfig): void { | ||
| $rectorConfig->parallel(600); |
Contributor
There was a problem hiding this comment.
you can also reduce job size, eg:
$rectorConfig->parallel(600, 32, 10);job size is basically how many files that needs to be processed per worker.
ref documentation
https://getrector.com/documentation/troubleshooting-parallel#content-configure-parallel
Contributor
Author
There was a problem hiding this comment.
In my case just increasing the timeout did the job, so I'd like to keep the default value here as you guys probably had reasons to choose those in the first place :D
samsonasik
reviewed
Jun 30, 2026
| use Rector\Config\RectorConfig; | ||
|
|
||
| return static function (RectorConfig $rectorConfig): void { | ||
| $rectorConfig->parallel(600); |
Contributor
There was a problem hiding this comment.
you can import "global" config, eg:
$rectorConfig->import(__DIR__ . '/default-rector.php');so you only change 1 default file if needed.
11de3cb to
34a3a89
Compare
34a3a89 to
a8f47d5
Compare
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.
While doing another check if the current 6.0 rector rules properly apply on the core I noticed, that rector times out internally.
This fixes this issue. Unfortunately there is no global rector config for this present which can be applied across all ruleset (at least as far as I and my AI agent know)
@samsonasik thoughts?
Specifically I am talking about this error:
This happened to me while using the
6.xof this branch and doing awhere
/Users/kevin/Documents/CakePHP/Org/cakephpis on the current5.xbranch state.Therefore I tried to apply all rules from the CakePHP 6.0 ruleset to the whole core framework at once