From dd7e2e551f939a1eb40e8951973dd1545a4e7658 Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Thu, 19 Sep 2024 00:44:37 +0200 Subject: [PATCH] chore: Add rector Signed-off-by: Julius Knorr --- composer.json | 6 +++++- composer.lock | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++- rector.php | 23 ++++++++++++++++++++ 3 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 rector.php diff --git a/composer.json b/composer.json index 1627d038d..cee98582b 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,9 @@ "config": { "platform": { "php": "8.0" + }, + "allow-plugins": { + "bamarni/composer-bin-plugin": true } }, "require": { @@ -19,7 +22,8 @@ "friendsofphp/php-cs-fixer": "^3.8", "nextcloud/coding-standard": "^1.0", "nextcloud/ocp": "dev-master", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.5", + "bamarni/composer-bin-plugin": "^1.8" }, "license": "AGPLv3", "authors": [ diff --git a/composer.lock b/composer.lock index 411a433a1..ac6ca7287 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,66 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f118a358162577fab7ee75cad4ef1383", + "content-hash": "dfca2194cfc2b7e48d963f85fa6d2b26", "packages": [], "packages-dev": [ + { + "name": "bamarni/composer-bin-plugin", + "version": "1.8.2", + "source": { + "type": "git", + "url": "https://github.com/bamarni/composer-bin-plugin.git", + "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880", + "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2.0", + "ext-json": "*", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.5", + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin" + }, + "autoload": { + "psr-4": { + "Bamarni\\Composer\\Bin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "No conflicts for your bin dependencies", + "keywords": [ + "composer", + "conflict", + "dependency", + "executable", + "isolation", + "tool" + ], + "support": { + "issues": "https://github.com/bamarni/composer-bin-plugin/issues", + "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2" + }, + "time": "2022-10-31T08:38:03+00:00" + }, { "name": "doctrine/instantiator", "version": "1.5.0", diff --git a/rector.php b/rector.php new file mode 100644 index 000000000..7842d9490 --- /dev/null +++ b/rector.php @@ -0,0 +1,23 @@ +withPaths([ + __DIR__ . '/appinfo', + __DIR__ . '/lib', + __DIR__ . '/tests', + ]) + ->withPhpSets(php81: true) + ->withTypeCoverageLevel(0) + ->withSets([ + // NextcloudSets::NEXTCLOUD_30, + ]);