From 02ec4cf4211b462b04b52570613ceabcd2b0702a Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 18 Sep 2025 15:41:47 +0200 Subject: [PATCH] Test --- dev/setup/codesniffer/ruleset.xml | 9 ++++++++- dev/tools/rector/README.md | 4 ++-- dev/tools/rector/rector.php | 10 ++++++++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 62159a97e2b..908365eb98c 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -28,8 +28,15 @@ - + diff --git a/dev/tools/rector/README.md b/dev/tools/rector/README.md index 339e3d78c8c..e4234e6671c 100644 --- a/dev/tools/rector/README.md +++ b/dev/tools/rector/README.md @@ -19,12 +19,12 @@ composer install ##### To make changes (remove --dry-run for real run) ```shell cd dev/tools/rector -./vendor/bin/rector process --dry-run +./vendor/bin/rector process --debug --dry-run ``` ##### To make changes on a given directory ```shell cd dev/tools/rector -./vendor/bin/rector process [--dry-run] [--clear-cache] ../../../htdocs/core/ +./vendor/bin/rector process --debug [--dry-run] [--clear-cache] ../../../htdocs/core/ ``` diff --git a/dev/tools/rector/rector.php b/dev/tools/rector/rector.php index 948cf7efbdb..55cf6117d97 100644 --- a/dev/tools/rector/rector.php +++ b/dev/tools/rector/rector.php @@ -33,7 +33,7 @@ use Rector\Set\ValueObject\SetList; return static function (RectorConfig $rectorConfig): void { $rectorConfig->phpVersion(PhpVersion::PHP_71); - //$rectorConfig->indent(' ', 4); + $rectorConfig->indent(' ', 4); // Traits seems not supported correctly by rector without declaring them as bootstrapFiles $arrayoftraitfiles = array( @@ -86,8 +86,14 @@ return static function (RectorConfig $rectorConfig): void { // This fix <> into != but it breaks other rules, so added at end. - $rectorConfig->rule(Rector\CodeQuality\Rector\NotEqual\CommonNotEqualRector::class); + //$rectorConfig->rule(Rector\CodeQuality\Rector\NotEqual\CommonNotEqualRector::class); + /* + $rectorConfig->skip([ + Rector\BetterPhpDocParser\PhpDocParser\BetterPhpDocParser::class, + Dolibarr\Rector\Renaming\GlobalToFunction::class + ]); + */ // Add all predefined rules to migrate to up to php 71. // Warning this break tab spacing of arrays on several lines