// rector.php
<?php
declare(strict_types=1);
use Rector\CodingStyle\Rector\Enum_\EnumCaseToPascalCaseRector;
use Rector\CodingStyle\Rector\FuncCall\ArraySpreadInsteadOfArrayMergeRector;
use Rector\Config\RectorConfig;
use RectorLaravel\Rector\MethodCall\WhereToWhereLikeRector;
use RectorLaravel\Set\LaravelSetList;
use RectorLaravel\Set\LaravelSetProvider;
return RectorConfig::configure()
->withPaths([__DIR__ . '/app'])
->withParallel()
->withRules([
ArraySpreadInsteadOfArrayMergeRector::class,
EnumCaseToPascalCaseRector::class,
])
->withConfiguredRule(WhereToWhereLikeRector::class, [
WhereToWhereLikeRector::USING_POSTGRES_DRIVER => true,
])
->withSetProviders(LaravelSetProvider::class)
->withPhpSets()
->withAttributesSets()
->withPreparedSets(
codeQuality: true,
codingStyle: true,
deadCode: true,
typeDeclarations: true,
privatization: true,
earlyReturn: true,
phpunitCodeQuality: true,
)
->withComposerBased(phpunit: true, laravel: true)
->withSets([
LaravelSetList::LARAVEL_ARRAYACCESS_TO_METHOD_CALL,
LaravelSetList::LARAVEL_CODE_QUALITY,
LaravelSetList::LARAVEL_COLLECTION,
LaravelSetList::LARAVEL_FACADE_ALIASES_TO_FULL_NAMES,
LaravelSetList::LARAVEL_IF_HELPERS,
LaravelSetList::LARAVEL_ELOQUENT_MAGIC_METHOD_TO_QUERY_BUILDER,
])
->withImportNames(removeUnusedImports: true);
PHPantom version
07cff1f
Installation method
Built from source
Operating system
Linux x86_64
Editor
Neovim
Bug description
Inside of the rector config file, none of the classes from the
Rectornamespace are discovered---the ones fromRectorLaravelare thoughSteps to reproduce
Error output or panic trace
.phpantom.toml
Additional context
No response