chore(tooling): update and improve rector config

- remove `AddOverrideAttributeToOverriddenPropertiesRector` from `withSkip` as the enum formatting has been fixed
- add `AddOverrideAttributeToOverriddenPropertiesRector` to `withSkip`
- comment out `typeDeclarationDocblocks` as these rules might not be what we want
- add new `WhereNullComparisonToWhereNullRector` rule
- remove `WhereToWhereLikeRector` as we are not only using Postgres on v5
This commit is contained in:
peaklabs-dev 2026-02-24 18:26:41 +01:00
parent 9302806891
commit a4edfaa682
No known key found for this signature in database

View file

@ -3,17 +3,17 @@
declare(strict_types=1);
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\CodingStyle\Rector\ClassLike\NewlineBetweenClassLikeStmtsRector;
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\NotIdentical\MbStrContainsRector;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Rector\Php85\Rector\Expression\NestedFuncCallsToPipeOperatorRector;
use Rector\Php85\Rector\Property\AddOverrideAttributeToOverriddenPropertiesRector;
use Rector\Php85\Rector\StmtsAwareInterface\SequentialAssignmentsToPipeOperatorRector;
use RectorLaravel\Rector\Class_\RemoveModelPropertyFromFactoriesRector;
use RectorLaravel\Rector\Empty_\EmptyToBlankAndFilledFuncRector;
use RectorLaravel\Rector\FuncCall\ConfigToTypedConfigMethodCallRector;
use RectorLaravel\Rector\FuncCall\RemoveDumpDataDeadCodeRector;
use RectorLaravel\Rector\MethodCall\WhereToWhereLikeRector;
use RectorLaravel\Rector\MethodCall\WhereNullComparisonToWhereNullRector;
use RectorLaravel\Rector\StaticCall\RequestStaticValidateToInjectRector;
use RectorLaravel\Set\LaravelSetList;
use RectorLaravel\Set\LaravelSetProvider;
@ -32,7 +32,7 @@ return RectorConfig::configure()
->withSkip([
__DIR__.'/bootstrap/cache',
AddOverrideAttributeToOverriddenMethodsRector::class,
NewlineBetweenClassLikeStmtsRector::class,
AddOverrideAttributeToOverriddenPropertiesRector::class,
])
->withCache(__DIR__.'/storage/rector', FileCacheStorage::class)
->withPhpSets()
@ -42,7 +42,7 @@ return RectorConfig::configure()
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
typeDeclarationDocblocks: true,
// typeDeclarationDocblocks: true,
privatization: true,
instanceOf: true,
earlyReturn: true,
@ -75,13 +75,11 @@ return RectorConfig::configure()
ConfigToTypedConfigMethodCallRector::class,
RemoveModelPropertyFromFactoriesRector::class,
RequestStaticValidateToInjectRector::class,
WhereNullComparisonToWhereNullRector::class,
])
->withConfiguredRule(RemoveDumpDataDeadCodeRector::class, [
'dd',
'ddd',
'dump',
'ray',
])
->withConfiguredRule(WhereToWhereLikeRector::class, [
WhereToWhereLikeRector::USING_POSTGRES_DRIVER => true,
]);