From e8280b1f1d37576ba9eee118a90a4dcc8d3376fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Fri, 28 Aug 2026 17:52:54 +0200 Subject: [PATCH] refactor(phpcs): update ruleset name and remove unused rules refactor(pint): change preset to psr12 and add version refactor(rector): simplify configuration and remove Laravel-specific sets --- phpcs.xml | 15 ++------------- pint.json | 3 ++- rector.php | 31 ++++++++++--------------------- 3 files changed, 14 insertions(+), 35 deletions(-) diff --git a/phpcs.xml b/phpcs.xml index 4e5b3c6..ac57ba1 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,8 +1,8 @@ - - Standard optimisé : Analyse statique complémentaire à Pint. + Standard optimisé: Analyse statique complémentaire à Pint. @@ -49,17 +49,6 @@ - - - - - - - - - - - */database/migrations/* diff --git a/pint.json b/pint.json index d270a74..ff0586c 100644 --- a/pint.json +++ b/pint.json @@ -1,5 +1,6 @@ { - "preset": "laravel", + "preset": "psr12", + "version": "1.0.0", "rules": { "indentation_type": true, "single_line_empty_body": false, diff --git a/rector.php b/rector.php index e484bd1..3e8707f 100644 --- a/rector.php +++ b/rector.php @@ -3,32 +3,21 @@ declare(strict_types=1); use Rector\Config\RectorConfig; -use RectorLaravel\Set\LaravelLevelSetList; -use RectorLaravel\Set\LaravelSetList; -use RectorLaravel\Set\LaravelSetProvider; +use Rector\Set\ValueObject\SetList; return RectorConfig::configure() - ->withSetProviders(LaravelSetProvider::class) ->withPaths([ __DIR__ . '/src', - __DIR__ . '/bootstrap', - __DIR__ . '/config', - __DIR__ . '/public', - __DIR__ . '/resources', - __DIR__ . '/routes', __DIR__ . '/tests', ]) ->withPhpSets() - ->withComposerBased(laravel: true) ->withSets([ - LaravelLevelSetList::UP_TO_LARAVEL_130, - LaravelSetList::LARAVEL_CODE_QUALITY, - LaravelSetList::LARAVEL_COLLECTION, - LaravelSetList::LARAVEL_IF_HELPERS, - LaravelSetList::LARAVEL_LEGACY_FACTORIES_TO_CLASSES, - LaravelSetList::LARAVEL_TYPE_DECLARATIONS, - LaravelSetList::LARAVEL_ELOQUENT_MAGIC_METHOD_TO_QUERY_BUILDER, - ]) - ->withTypeCoverageLevel(0) - ->withDeadCodeLevel(0) - ->withCodeQualityLevel(0); + SetList::PHP_POLYFILLS, + SetList::CODE_QUALITY, + SetList::DEAD_CODE, + SetList::PRIVATIZATION, + SetList::TYPE_DECLARATION, + SetList::EARLY_RETURN, + SetList::INSTANCEOF, + SetList::IF, + ]);