From 95c95e697b1e92d9e51d6067bc5c45a203697893 Mon Sep 17 00:00:00 2001 From: Timo Huisman Date: Thu, 25 Jan 2024 09:08:33 +0100 Subject: [PATCH] refactor: replace deprecated LevelSetLists for PHPUnit, Symfony and Twig See https://github.com/rectorphp/rector-src/pull/5477 --- config/drupal-10/drupal-10.0-deprecations.php | 12 ++++++------ config/drupal-10/drupal-10.1-deprecations.php | 4 ++-- config/drupal-9/drupal-9-all-deprecations.php | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/drupal-10/drupal-10.0-deprecations.php b/config/drupal-10/drupal-10.0-deprecations.php index db48e70e..5d97596c 100644 --- a/config/drupal-10/drupal-10.0-deprecations.php +++ b/config/drupal-10/drupal-10.0-deprecations.php @@ -4,15 +4,15 @@ use DrupalRector\Rector\PHPUnit\ShouldCallParentMethodsRector; use Rector\Config\RectorConfig; -use Rector\PHPUnit\Set\PHPUnitLevelSetList; -use Rector\Symfony\Set\SymfonyLevelSetList; -use Rector\Symfony\Set\TwigLevelSetList; +use Rector\PHPUnit\Set\PHPUnitSetList; +use Rector\Symfony\Set\SymfonySetList; +use Rector\Symfony\Set\TwigSetList; return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([ - PHPUnitLevelSetList::UP_TO_PHPUNIT_90, - SymfonyLevelSetList::UP_TO_SYMFONY_62, - TwigLevelSetList::UP_TO_TWIG_240, + PHPUnitSetList::PHPUNIT_90, + SymfonySetList::SYMFONY_62, + TwigSetList::TWIG_240, ]); $rectorConfig->rule(ShouldCallParentMethodsRector::class); diff --git a/config/drupal-10/drupal-10.1-deprecations.php b/config/drupal-10/drupal-10.1-deprecations.php index 0cbe4940..54393725 100644 --- a/config/drupal-10/drupal-10.1-deprecations.php +++ b/config/drupal-10/drupal-10.1-deprecations.php @@ -8,11 +8,11 @@ use DrupalRector\Rector\ValueObject\DrupalIntroducedVersionConfiguration; use DrupalRector\Rector\ValueObject\FunctionToStaticConfiguration; use Rector\Config\RectorConfig; -use Rector\Symfony\Set\SymfonyLevelSetList; +use Rector\Symfony\Set\SymfonySetList; return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([ - SymfonyLevelSetList::UP_TO_SYMFONY_63, + SymfonySetList::SYMFONY_63, ]); // https://www.drupal.org/node/3244583 diff --git a/config/drupal-9/drupal-9-all-deprecations.php b/config/drupal-9/drupal-9-all-deprecations.php index d76cc289..8c524574 100644 --- a/config/drupal-9/drupal-9-all-deprecations.php +++ b/config/drupal-9/drupal-9-all-deprecations.php @@ -5,7 +5,7 @@ use DrupalRector\Services\AddCommentService; use DrupalRector\Set\Drupal9SetList; use Rector\Config\RectorConfig; -use Rector\PHPUnit\Set\PHPUnitLevelSetList; +use Rector\PHPUnit\Set\PHPUnitSetList; return static function (RectorConfig $rectorConfig): void { $rectorConfig->singleton(AddCommentService::class, function () { @@ -17,7 +17,7 @@ Drupal9SetList::DRUPAL_92, Drupal9SetList::DRUPAL_93, Drupal9SetList::DRUPAL_94, - PHPUnitLevelSetList::UP_TO_PHPUNIT_90, + PHPUnitSetList::PHPUNIT_90, ]); $rectorConfig->bootstrapFiles([