mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
wip prepare rector config for up to PHP74 ruleset
This commit is contained in:
parent
4c5dae60a8
commit
e84a93bd0c
47
rector.php
47
rector.php
@ -12,14 +12,49 @@ return static function (RectorConfig $rectorConfig): void {
|
||||
__DIR__ . '/src',
|
||||
]);
|
||||
|
||||
$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class);
|
||||
$rectorConfig->cacheDirectory(__DIR__.'/.cache/rector');
|
||||
//$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class);
|
||||
//$rectorConfig->cacheDirectory(__DIR__ . '/.cache/rector');
|
||||
|
||||
// register a single rule
|
||||
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
|
||||
$rectorConfig->disableParallel();
|
||||
|
||||
// define sets of rules
|
||||
// $rectorConfig->sets([
|
||||
// LevelSetList::UP_TO_PHP_74
|
||||
// ]);
|
||||
//define sets of rules
|
||||
$rectorConfig->sets([
|
||||
LevelSetList::UP_TO_PHP_74
|
||||
]);
|
||||
|
||||
// skip some path...
|
||||
$rectorConfig->skip([
|
||||
// make rector stuck for some files
|
||||
\Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector::class,
|
||||
|
||||
// we need to discuss this: are we going to have FALSE in tests instead of an error ?
|
||||
\Rector\Php71\Rector\FuncCall\CountOnNullRector::class,
|
||||
|
||||
// must merge MR500 and review a typing of "ArrayCollection" in entities
|
||||
\Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector::class,
|
||||
|
||||
// remove all PHP80 rules, in order to activate them one by one
|
||||
\Rector\Php80\Rector\ClassMethod\AddParamBasedOnParentClassMethodRector::class,
|
||||
\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class,
|
||||
\Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector::class,
|
||||
\Rector\Php80\Rector\FuncCall\ClassOnObjectRector::class,
|
||||
\Rector\Php80\Rector\ClassConstFetch\ClassOnThisVariableObjectRector::class,
|
||||
\Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector::class,
|
||||
\Rector\Php80\Rector\Class_\DoctrineAnnotationClassToAttributeRector::class,
|
||||
\Rector\Php80\Rector\ClassMethod\FinalPrivateToPrivateVisibilityRector::class,
|
||||
\Rector\Php80\Rector\Ternary\GetDebugTypeRector::class,
|
||||
\Rector\Php80\Rector\FunctionLike\MixedTypeRector::class,
|
||||
\Rector\Php80\Rector\Property\NestedAnnotationToAttributeRector::class,
|
||||
\Rector\Php80\Rector\FuncCall\Php8ResourceReturnToObjectRector::class,
|
||||
\Rector\Php80\Rector\Catch_\RemoveUnusedVariableInCatchRector::class,
|
||||
\Rector\Php80\Rector\ClassMethod\SetStateToStaticRector::class,
|
||||
\Rector\Php80\Rector\NotIdentical\StrContainsRector::class,
|
||||
\Rector\Php80\Rector\Identical\StrEndsWithRector::class,
|
||||
\Rector\Php80\Rector\Identical\StrStartsWithRector::class,
|
||||
\Rector\Php80\Rector\Class_\StringableForToStringRector::class,
|
||||
\Rector\Php80\Rector\FuncCall\TokenGetAllToObjectRector::class,
|
||||
\Rector\Php80\Rector\FunctionLike\UnionTypesRector::class
|
||||
]);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user