Skip to content

Deprecate ForRepeatedCountToOwnVariableRector - #8620

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-deprecate-for-repeated-count
Oct 11, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-deprecate-for-repeated-count

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Deprecate ForRepeatedCountToOwnVariableRector - the gain is negligible.

  • On arrays count() is O(1), so hoisting it into a variable saves nothing.
  • On collections a dedicated count() method is more suitable than a for loop.

Follows the standard deprecation path: marker DeprecatedInterface + @deprecated docblock, gutted refactor(), removed test fixtures, unregistered from CodeQualityLevel.

@TomasVotruba
TomasVotruba merged commit 7e7338c into main Oct 11, 2026
49 checks passed
@TomasVotruba
TomasVotruba deleted the tv-deprecate-for-repeated-count branch October 11, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant