Skip to content

Deprecate LevelSetList in favor of withPhpSets()/withPhpLevel() - #9001

Merged
TomasVotruba merged 1 commit into
mainfrom
deprecate-level-set-list
Nov 17, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
deprecate-level-set-list

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

LevelSetList::UP_TO_PHP_* and the config/set/level/up-to-php*.php files are the last public way to load the per-version php*.php sets, deprecated since #8405.

  • mark LevelSetList as @deprecated
  • extend the withSets() deprecation warning to the up-to-php*.php level files too
  • level files reference each other by path, not via the deprecated class
  • RuleWithConfigurationAfterSet test switches to the php-version-based set

Next step: remove LevelSetList, the level files and the php*.php sets together in a later release.

Use instead:

return RectorConfig::configure()
    ->withPhpSets();

The up-to-php*.php level files load the per-version php*.php sets, which are already deprecated since #8405. Using any of them via withSets() now shows the same deprecation warning. The level files reference each other by path, so they no longer depend on the deprecated class.
@TomasVotruba
TomasVotruba enabled auto-merge (squash) November 17, 2026 23:16
@TomasVotruba
TomasVotruba merged commit 307572f into main Nov 17, 2026
51 checks passed
@TomasVotruba
TomasVotruba deleted the deprecate-level-set-list branch November 17, 2026 23:17
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