From b9746d0e1edb95f7613f8719c1e3890a7fe3b2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 6 Mar 2025 17:17:10 +0100 Subject: [PATCH 1/5] chore: Bump rector/rector to 2.0 and move it to require MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index c18cbf6..43a387d 100644 --- a/composer.json +++ b/composer.json @@ -15,12 +15,12 @@ } ], "require": { - "php": "^8.1" + "php": "^8.1", + "rector/rector": "^2.0" }, "require-dev": { "phpunit/phpunit": "^10.5", - "ramsey/devtools": "^2.0", - "rector/rector": "^1.2" + "ramsey/devtools": "^2.0" }, "minimum-stability": "dev", "prefer-stable": true, From 305ca8a7f5e37738c84ccef86a009622569cb7fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 6 Mar 2025 17:44:13 +0100 Subject: [PATCH 2/5] chore: Remove use of removed interface for set lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- src/Set/NextcloudSets.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Set/NextcloudSets.php b/src/Set/NextcloudSets.php index 52c2e4b..38089f2 100644 --- a/src/Set/NextcloudSets.php +++ b/src/Set/NextcloudSets.php @@ -4,12 +4,7 @@ namespace Nextcloud\Rector\Set; -use Rector\Set\Contract\SetListInterface; - -/** - * @psalm-suppress DeprecatedInterface - */ -final class NextcloudSets implements SetListInterface +final class NextcloudSets { public const NEXTCLOUD_25 = __DIR__ . '/../../config/nextcloud-25/nextcloud-25-deprecations.php'; public const NEXTCLOUD_26 = __DIR__ . '/../../config/nextcloud-26/nextcloud-26-deprecations.php'; From ba2a4a2e21b4dbb3648b33388e3773b2cc85b63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 6 Mar 2025 17:46:19 +0100 Subject: [PATCH 3/5] fix: Require nextcloud/ocp to provide annotation classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- composer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 43a387d..2638ecf 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ ], "require": { "php": "^8.1", + "nextcloud/ocp": "*", "rector/rector": "^2.0" }, "require-dev": { @@ -26,7 +27,8 @@ "prefer-stable": true, "autoload": { "psr-4": { - "Nextcloud\\Rector\\": "src/" + "Nextcloud\\Rector\\": "src/", + "OCP\\": "vendor/nextcloud/ocp/OCP" } }, "autoload-dev": { From e2b3bf7c60186bed5ba4e15578766045d0792207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 6 Mar 2025 18:01:06 +0100 Subject: [PATCH 4/5] chore: Set PHP platform to 8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- composer.json | 3 +++ .../Rector/LegacyGetterToOcpServerGetRector/config/config.php | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2638ecf..63bdfa4 100644 --- a/composer.json +++ b/composer.json @@ -46,6 +46,9 @@ "ramsey/composer-repl": true, "ramsey/devtools": true }, + "platform": { + "php": "8.1" + }, "sort-packages": true }, "extra": { diff --git a/tests/Rector/LegacyGetterToOcpServerGetRector/config/config.php b/tests/Rector/LegacyGetterToOcpServerGetRector/config/config.php index cc0b8c7..16de054 100644 --- a/tests/Rector/LegacyGetterToOcpServerGetRector/config/config.php +++ b/tests/Rector/LegacyGetterToOcpServerGetRector/config/config.php @@ -11,7 +11,6 @@ ->withConfiguredRule( LegacyGetterToOcpServerGetRector::class, [ - /** @phpstan-ignore class.notFound */ new LegacyGetterToOcpServerGet('getRequest', IRequest::class), new LegacyGetterToOcpServerGet('getContactsManager', 'OCP\Contacts\IManager'), ], From bbf5de85491f22a1e124c5233ff71c3488a9cf05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 10 Mar 2025 09:45:06 +0100 Subject: [PATCH 5/5] chore: Set minimum OCP version to 27 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have to require a version of nextcloud/ocp that contains the classes we use in the tested sets. Otherwise tests for 26 and 27 sets will fail when pulling the lowest version of dependendies. Signed-off-by: Côme Chilliet --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 63bdfa4..8639c12 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ ], "require": { "php": "^8.1", - "nextcloud/ocp": "*", + "nextcloud/ocp": ">=27", "rector/rector": "^2.0" }, "require-dev": {