phpvms/rector.php
Arthur Parienté 992b6d343a
[8.x] feature: upgrade to Laravel 13 (#2204)
* upgrade to laravel 13

* phpstan

* rollback to symfony 7.4

* fix: ModuleService merge

* refactor: new rector rules
2026-05-06 11:27:21 -05:00

45 lines
1.6 KiB
PHP

<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector;
use RectorLaravel\Rector\Class_\AppendsPropertyToAppendsAttributeRector;
use RectorLaravel\Rector\Class_\FillablePropertyToFillableAttributeRector;
use RectorLaravel\Rector\Class_\GuardedPropertyToGuardedAttributeRector;
use RectorLaravel\Rector\Class_\HiddenPropertyToHiddenAttributeRector;
use RectorLaravel\Rector\Class_\TablePropertyToTableAttributeRector;
use RectorLaravel\Rector\Class_\TouchesPropertyToTouchesAttributeRector;
use RectorLaravel\Set\LaravelSetProvider;
return RectorConfig::configure()
->withPaths([
__DIR__.'/app',
__DIR__.'/bootstrap/app.php',
__DIR__.'/config',
__DIR__.'/routes',
__DIR__.'/resources',
__DIR__.'/tests',
])
->withSetProviders(LaravelSetProvider::class)
->withComposerBased(laravel: true)
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
earlyReturn: true,
)
->withPhpSets()
->withSkip([
RemoveUselessVarTagRector::class => [
__DIR__.'/app/Http/Resources/SimBriefResource.php',
],
FillablePropertyToFillableAttributeRector::class,
TablePropertyToTableAttributeRector::class,
GuardedPropertyToGuardedAttributeRector::class,
AppendsPropertyToAppendsAttributeRector::class,
TouchesPropertyToTouchesAttributeRector::class,
HiddenPropertyToHiddenAttributeRector::class,
]);