diff --git a/config/nextcloud-25/nextcloud-25-deprecations.php b/config/nextcloud-25/nextcloud-25-deprecations.php index 4aa3b38..32266ca 100644 --- a/config/nextcloud-25/nextcloud-25-deprecations.php +++ b/config/nextcloud-25/nextcloud-25-deprecations.php @@ -4,12 +4,14 @@ use Nextcloud\Rector\Rector\LegacyGetterToOcpServerGetRector; use Nextcloud\Rector\Rector\OcServerToOcpServerRector; +use Nextcloud\Rector\Rector\OcpUtilAddScriptRector; use Nextcloud\Rector\ValueObject\LegacyGetterToOcpServerGet; use Rector\Config\RectorConfig; return static function (RectorConfig $rectorConfig): void { $rectorConfig->rules([ OcServerToOcpServerRector::class, + OcpUtilAddScriptRector::class, ]); $rectorConfig->ruleWithConfiguration( LegacyGetterToOcpServerGetRector::class, diff --git a/config/nextcloud-26/nextcloud-26-deprecations.php b/config/nextcloud-26/nextcloud-26-deprecations.php index 177cb8a..abe223e 100644 --- a/config/nextcloud-26/nextcloud-26-deprecations.php +++ b/config/nextcloud-26/nextcloud-26-deprecations.php @@ -3,12 +3,14 @@ declare(strict_types=1); use Nextcloud\Rector\Rector\RenameParameterRector; +use Nextcloud\Rector\Set\NextcloudSets; use Nextcloud\Rector\ValueObject\RenameParameter; use Rector\Config\RectorConfig; use Rector\Php80\Rector\Class_\AnnotationToAttributeRector; use Rector\Php80\ValueObject\AnnotationToAttribute; return static function (RectorConfig $rectorConfig): void { + $rectorConfig->sets([NextcloudSets::NEXTCLOUD_25]); $rectorConfig->ruleWithConfiguration( AnnotationToAttributeRector::class, [ diff --git a/config/nextcloud-27/nextcloud-27-deprecations.php b/config/nextcloud-27/nextcloud-27-deprecations.php index 5dcd8aa..43013dc 100644 --- a/config/nextcloud-27/nextcloud-27-deprecations.php +++ b/config/nextcloud-27/nextcloud-27-deprecations.php @@ -2,11 +2,13 @@ declare(strict_types=1); +use Nextcloud\Rector\Set\NextcloudSets; use Rector\Config\RectorConfig; use Rector\Php80\Rector\Class_\AnnotationToAttributeRector; use Rector\Php80\ValueObject\AnnotationToAttribute; return static function (RectorConfig $rectorConfig): void { + $rectorConfig->sets([NextcloudSets::NEXTCLOUD_26]); $rectorConfig->ruleWithConfiguration( AnnotationToAttributeRector::class, [ diff --git a/config/nextcloud-all/nextcloud-all-deprecations.php b/config/nextcloud-all/nextcloud-all-deprecations.php deleted file mode 100644 index 9db7787..0000000 --- a/config/nextcloud-all/nextcloud-all-deprecations.php +++ /dev/null @@ -1,12 +0,0 @@ -rules([ - OcpUtilAddScriptRector::class, - ]); -}; diff --git a/src/Set/NextcloudSets.php b/src/Set/NextcloudSets.php index 5f30a72..95718e4 100644 --- a/src/Set/NextcloudSets.php +++ b/src/Set/NextcloudSets.php @@ -11,7 +11,6 @@ */ final class NextcloudSets implements SetListInterface { - public const NEXTCLOUD_ALL = __DIR__ . '/../../config/nextcloud-all/nextcloud-all-deprecations.php'; public const NEXTCLOUD_25 = __DIR__ . '/../../config/nextcloud-25/nextcloud-25-deprecations.php'; public const NEXTCLOUD_26 = __DIR__ . '/../../config/nextcloud-26/nextcloud-26-deprecations.php'; public const NEXTCLOUD_27 = __DIR__ . '/../../config/nextcloud-27/nextcloud-27-deprecations.php'; diff --git a/tests/Set/config/config.php b/tests/Set/config/config.php index 70c9021..5a3df23 100644 --- a/tests/Set/config/config.php +++ b/tests/Set/config/config.php @@ -7,6 +7,5 @@ return RectorConfig::configure() ->withSets([ - NextcloudSets::NEXTCLOUD_ALL, - NextcloudSets::NEXTCLOUD_25, + NextcloudSets::NEXTCLOUD_26, ]);