From 5fdfdbb1ee887a95b5c20fe926557a9c81e3d884 Mon Sep 17 00:00:00 2001 From: bjorn Date: Sun, 20 Oct 2024 11:28:39 +0200 Subject: [PATCH] fix: revert adding the Hook into its own set and move class --- config/hook-convert/hook-convert.php | 13 ------------- rector.php | 11 +++-------- .../Rector => Rector/Convert}/HookConvertRector.php | 2 +- src/Set/HookConvertSetList.php | 12 ------------ 4 files changed, 4 insertions(+), 34 deletions(-) delete mode 100644 config/hook-convert/hook-convert.php rename src/{Convert/Rector => Rector/Convert}/HookConvertRector.php (99%) delete mode 100644 src/Set/HookConvertSetList.php diff --git a/config/hook-convert/hook-convert.php b/config/hook-convert/hook-convert.php deleted file mode 100644 index 95b09388..00000000 --- a/config/hook-convert/hook-convert.php +++ /dev/null @@ -1,13 +0,0 @@ -rule(HookConvertRector::class); - $rectorConfig->bootstrapFiles([ - __DIR__.'/../drupal-phpunit-bootstrap-file.php', - ]); -}; diff --git a/rector.php b/rector.php index 2f015b43..85d0b687 100644 --- a/rector.php +++ b/rector.php @@ -3,7 +3,6 @@ declare(strict_types=1); use DrupalFinder\DrupalFinder; -use DrupalRector\Set\HookConvertSetList; use DrupalRector\Set\Drupal10SetList; use DrupalRector\Set\Drupal8SetList; use DrupalRector\Set\Drupal9SetList; @@ -13,14 +12,10 @@ // Adjust the set lists to be more granular to your Drupal requirements. // @todo find out how to only load the relevant rector rules. // Should we try and load \Drupal::VERSION and check? - // $rectorConfig->sets([ - // Drupal8SetList::DRUPAL_8, - // Drupal9SetList::DRUPAL_9, - // Drupal10SetList::DRUPAL_10, - // ]); - $rectorConfig->sets([ - HookConvertSetList::HOOK_CONVERT, + Drupal8SetList::DRUPAL_8, + Drupal9SetList::DRUPAL_9, + Drupal10SetList::DRUPAL_10, ]); $drupalFinder = new DrupalFinder(); diff --git a/src/Convert/Rector/HookConvertRector.php b/src/Rector/Convert/HookConvertRector.php similarity index 99% rename from src/Convert/Rector/HookConvertRector.php rename to src/Rector/Convert/HookConvertRector.php index eafb94fb..b2740c8b 100644 --- a/src/Convert/Rector/HookConvertRector.php +++ b/src/Rector/Convert/HookConvertRector.php @@ -5,7 +5,7 @@ declare(strict_types=1); -namespace DrupalRector\Convert\Rector; +namespace DrupalRector\Rector\Convert; use Composer\InstalledVersions; use PhpParser\Node; diff --git a/src/Set/HookConvertSetList.php b/src/Set/HookConvertSetList.php deleted file mode 100644 index 4ecfaa73..00000000 --- a/src/Set/HookConvertSetList.php +++ /dev/null @@ -1,12 +0,0 @@ -