Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sets complement each other #19

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
]);
Loading