Skip to content

rector.php uses deprecated LevelSetList::UP_TO_PHP_82 #164

@s2x

Description

@s2x

Problem

rector.php uses Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_82 which is deprecated in Rector 2.x. The recommended replacement is the ->withPhpSets() fluent method.

Location

  • rector.php, line 6

Current Code

use Rector\Set\ValueObject\LevelSetList;

return RectorConfig::configure()
    ->withPaths([__DIR__ . '/src'])
    ->withSets([
        LevelSetList::UP_TO_PHP_82,
    ]);

Proposed Fix

return RectorConfig::configure()
    ->withPaths([__DIR__ . '/src'])
    ->withPhpSets(php82: true);

This removes the deprecated import and uses the fluent API that Rector 2.x recommends.

Priority

🟢 MINOR — deprecated API usage; will break in future Rector versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    minorMinor priority - code qualitytechnical-debtTechnical debt

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions