Skip to content

Commit c5cceb7

Browse files
authored
Merge pull request #19 from nextcloud-libraries/feat/make-sets-complement-each-other
Make sets complement each other
2 parents beb79dc + 6725df4 commit c5cceb7

File tree

6 files changed

+7
-15
lines changed

6 files changed

+7
-15
lines changed

config/nextcloud-25/nextcloud-25-deprecations.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
use Nextcloud\Rector\Rector\LegacyGetterToOcpServerGetRector;
66
use Nextcloud\Rector\Rector\OcServerToOcpServerRector;
7+
use Nextcloud\Rector\Rector\OcpUtilAddScriptRector;
78
use Nextcloud\Rector\ValueObject\LegacyGetterToOcpServerGet;
89
use Rector\Config\RectorConfig;
910

1011
return static function (RectorConfig $rectorConfig): void {
1112
$rectorConfig->rules([
1213
OcServerToOcpServerRector::class,
14+
OcpUtilAddScriptRector::class,
1315
]);
1416
$rectorConfig->ruleWithConfiguration(
1517
LegacyGetterToOcpServerGetRector::class,

config/nextcloud-26/nextcloud-26-deprecations.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
declare(strict_types=1);
44

55
use Nextcloud\Rector\Rector\RenameParameterRector;
6+
use Nextcloud\Rector\Set\NextcloudSets;
67
use Nextcloud\Rector\ValueObject\RenameParameter;
78
use Rector\Config\RectorConfig;
89
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
910
use Rector\Php80\ValueObject\AnnotationToAttribute;
1011

1112
return static function (RectorConfig $rectorConfig): void {
13+
$rectorConfig->sets([NextcloudSets::NEXTCLOUD_25]);
1214
$rectorConfig->ruleWithConfiguration(
1315
AnnotationToAttributeRector::class,
1416
[

config/nextcloud-27/nextcloud-27-deprecations.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
declare(strict_types=1);
44

5+
use Nextcloud\Rector\Set\NextcloudSets;
56
use Rector\Config\RectorConfig;
67
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
78
use Rector\Php80\ValueObject\AnnotationToAttribute;
89

910
return static function (RectorConfig $rectorConfig): void {
11+
$rectorConfig->sets([NextcloudSets::NEXTCLOUD_26]);
1012
$rectorConfig->ruleWithConfiguration(
1113
AnnotationToAttributeRector::class,
1214
[

config/nextcloud-all/nextcloud-all-deprecations.php

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/Set/NextcloudSets.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212
final class NextcloudSets implements SetListInterface
1313
{
14-
public const NEXTCLOUD_ALL = __DIR__ . '/../../config/nextcloud-all/nextcloud-all-deprecations.php';
1514
public const NEXTCLOUD_25 = __DIR__ . '/../../config/nextcloud-25/nextcloud-25-deprecations.php';
1615
public const NEXTCLOUD_26 = __DIR__ . '/../../config/nextcloud-26/nextcloud-26-deprecations.php';
1716
public const NEXTCLOUD_27 = __DIR__ . '/../../config/nextcloud-27/nextcloud-27-deprecations.php';

tests/Set/config/config.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77

88
return RectorConfig::configure()
99
->withSets([
10-
NextcloudSets::NEXTCLOUD_ALL,
11-
NextcloudSets::NEXTCLOUD_25,
10+
NextcloudSets::NEXTCLOUD_26,
1211
]);

0 commit comments

Comments
 (0)