Summary
rector.php already skips RenameVariableToMatchMethodCallReturnTypeRector, RenameVariableToMatchNewTypeRector and RenameParamToMatchTypeRector - the established position being that Rector should not rename developers' variables. The Foreach_ members of the same family were never added, so they still fire.
Three downstream Vortex sites independently added the same skip, which points at an incomplete list rather than three separate preferences.
Details
Add to the skip list:
Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchMethodCallReturnTypeRector - added independently by three downstream sites.
Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchExprVariableRector - added by one; same family, same rationale.
While in the file, audit the whole skip list:
- Check each existing skip still reproduces against the current Rector and Drupal Rector versions. Skips accumulate around rules that later change behaviour, get renamed, or are removed upstream, and a stale entry silently suppresses a rule that would now be useful - or names a class that no longer exists.
- Remove any override that no longer has a reason.
- Add a short comment to each skip that stays, so the next audit does not have to rediscover why it is there. Several current entries have none.
- Confirm the
withPhpSets() level still matches the PHP version the template targets.
Summary
rector.phpalready skipsRenameVariableToMatchMethodCallReturnTypeRector,RenameVariableToMatchNewTypeRectorandRenameParamToMatchTypeRector- the established position being that Rector should not rename developers' variables. TheForeach_members of the same family were never added, so they still fire.Three downstream Vortex sites independently added the same skip, which points at an incomplete list rather than three separate preferences.
Details
Add to the skip list:
Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchMethodCallReturnTypeRector- added independently by three downstream sites.Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchExprVariableRector- added by one; same family, same rationale.While in the file, audit the whole skip list:
withPhpSets()level still matches the PHP version the template targets.