Skip to content

Deprecate PhpVersionFeature, use PhpVersion constants directly in rules - #8839

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-deprecate-php-version-feature
Oct 25, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-deprecate-php-version-feature

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Follows the recent move away from indirection layers (e.g. the NullToStrictStringIntConverter removal).

PhpVersionFeature was a thin name map over PhpVersion - every constant was just an alias for a PhpVersion::PHP_XX int. This swaps all in-repo usages to the underlying PhpVersion::* constants and marks the class @deprecated.

  • All 281 in-repo references (src/, rules/, rules-tests/, tests/) now use PhpVersion::PHP_XX directly.
  • PhpVersionFeature is kept and marked @api + @deprecated so sibling packages (symfony, doctrine, phpunit, downgrade-php) that still reference it keep working; @api keeps the dead-code detector green while those are migrated.

Green locally: composer complete-check (ECS, PHPStan level 8, PHPUnit) and composer rector.

@TomasVotruba
TomasVotruba force-pushed the tv-deprecate-php-version-feature branch from 1a7ed79 to f0d4236 Compare October 25, 2026 22:59
@TomasVotruba

Copy link
Copy Markdown
Member Author

Instead of having hundreds of version constants for each RFC/feature, lets narrow to simple and clear PHP versions 👍

@TomasVotruba
TomasVotruba merged commit 6aff6ac into main Oct 25, 2026
48 of 49 checks passed
@TomasVotruba
TomasVotruba deleted the tv-deprecate-php-version-feature branch October 25, 2026 23:00
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