Rule reference
Any rule can be registered on its own, without pulling in its set:
php
use SanderMuller\FluentValidationRector\Rector\ValidationArrayToFluentRuleRector;
use SanderMuller\FluentValidationRector\Rector\ValidationStringToFluentRuleRector;
return RectorConfig::configure()
->withRules([
ValidationStringToFluentRuleRector::class,
ValidationArrayToFluentRuleRector::class,
]);| Rule | Set | Does |
|---|---|---|
InlineResolvableParentRulesRector | CONVERT, in ALL | inlines a ...parent::rules() spread when the parent is a plain return |
ValidationStringToFluentRuleRector | CONVERT, in ALL | pipe-delimited strings → FluentRule chains |
ValidationArrayToFluentRuleRector | CONVERT, in ALL | rule arrays, Rule:: and Password:: objects → FluentRule chains |
ConvertLivewireRuleAttributeRector | CONVERT, in ALL | Livewire #[Rule] / #[Validate] → a generated rules() |
GroupWildcardRulesToEachRector | GROUP, in ALL | flat wildcard and dotted keys → nested each() / children() |
AddHasFluentRulesTraitRector | TRAITS, in ALL | adds use HasFluentRules; to FormRequests using FluentRule or declaring schema() |
AddHasFluentValidationTraitRector | TRAITS, in ALL | adds the Livewire trait, plain or Filament variant |
PromoteFieldFactoryRector | SIMPLIFY, not in ALL | field()->rule('max:61') → string()->max(61) |
SimplifyFluentRuleRector | SIMPLIFY, not in ALL | factory shortcuts, between(), redundant-type cleanup |
SimplifyRuleWrappersRector | SIMPLIFY, not in ALL | ->rule('in:a,b') and friends → native typed methods |
InlineMessageParamRector | SIMPLIFY, not in ALL | ->message() / ->messageFor() → inline message: param |
UpdateRulesReturnTypeDocblockRector | POLISH, not in ALL | narrows @return on pure-fluent rules() |
ConvertToFluentSchemaRector | SCHEMA, not in ALL | rules() of FluentRule:: chains → a schema(FluentSchema $rules) builder |
The frozen public surface (symbols, wire keys, behaviour) is in PUBLIC_API.md.