Skip to content

Commit

Permalink
Merge pull request #19 from nextcloud-libraries/feat/make-sets-comple…
Browse files Browse the repository at this point in the history
…ment-each-other

Make sets complement each other
  • Loading branch information
come-nc authored Sep 19, 2024
2 parents beb79dc + 6725df4 commit c5cceb7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 15 deletions.
2 changes: 2 additions & 0 deletions config/nextcloud-25/nextcloud-25-deprecations.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions config/nextcloud-26/nextcloud-26-deprecations.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
[
Expand Down
2 changes: 2 additions & 0 deletions config/nextcloud-27/nextcloud-27-deprecations.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
[
Expand Down
12 changes: 0 additions & 12 deletions config/nextcloud-all/nextcloud-all-deprecations.php

This file was deleted.

1 change: 0 additions & 1 deletion src/Set/NextcloudSets.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 1 addition & 2 deletions tests/Set/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@

return RectorConfig::configure()
->withSets([
NextcloudSets::NEXTCLOUD_ALL,
NextcloudSets::NEXTCLOUD_25,
NextcloudSets::NEXTCLOUD_26,
]);

0 comments on commit c5cceb7

Please sign in to comment.