Skip to content

Conversation

@samsonasik
Copy link
Member

Per #355 (review)

This ensure increment variable to consistent accroos downgrade process, avoid keep changing on downgrade as run in parallel.

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba let's merge it for faster feedback to test ;)

This is ensure counter reset when move to other file so the increment will consistent, previously it was always changed, and as parallel, it keep changing randomly accross files.

This PR fix it :)

@samsonasik samsonasik merged commit f684c1a into main Dec 20, 2025
8 checks passed
@samsonasik samsonasik deleted the fix-keep branch December 20, 2025 15:51
@samsonasik
Copy link
Member Author

It works ok now 👍 , when move to other file, the counter reset and increment in the new file rectorphp/rector@547afbd

if ($currentFile !== $this->file->getFilePath()) {
$this->counter = 0;
$currentFile = $this->file->getFilePath();
}
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a simple comment on "why" is this needed? Just for future reference

Copy link
Member Author

Choose a reason for hiding this comment

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

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