Skip to content

Conversation

@dereuromark
Copy link
Member

Summary

  • Add checks to skip transformation when code is already in the new format
  • Skip if 2nd arg is a Closure or ArrowFunction (callable in new position)
  • Skip if 3rd arg is an array literal (options in new position)

This prevents the rector from swapping arguments back when run multiple times on the same codebase.

Fixes #376

Add checks to skip transformation when code is already in the new format:
- Skip if 2nd arg is a Closure or ArrowFunction (new format)
- Skip if 3rd arg is an array literal (new format)

This prevents the rector from swapping arguments back when run multiple
times on the same codebase.

Fixes #376
@LordSimal LordSimal merged commit 3a4828e into 6.x Jan 13, 2026
4 of 5 checks passed
@LordSimal LordSimal deleted the fix-event-manager-rector-idempotency branch January 13, 2026 09:55
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