laravel-fluent-validation-rector maintained by sandermuller
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.5.2
- sandermuller/laravel-fluent-validation ^1.32.0
- php ^8.3
- rector/rector ^2.5.2
- sandermuller/laravel-fluent-validation ^1.32.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.5.2
- sandermuller/laravel-fluent-validation ^1.32.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.5.2
- sandermuller/laravel-fluent-validation ^1.32.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.5.2
- sandermuller/laravel-fluent-validation ^1.32.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.5.2
- sandermuller/laravel-fluent-validation ^1.27.2
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.27.2
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.27.2
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.27.2
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.27.2
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.27.2
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.27.2
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.3
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.27.2
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.20
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.19
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.19
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.17
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.17
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.17
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.8.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.8.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.8.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.8.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.8.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.8.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.8.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.8.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.8
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.7.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.7.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.7.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.7.1
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
- php ^8.2
- rector/rector ^2.4.1
- sandermuller/laravel-fluent-validation ^1.0
- symplify/rule-doc-generator-contracts ^11.2
Laravel Fluent Validation Rector
Rector rules for migrating Laravel validation to sandermuller/laravel-fluent-validation. Pipe-delimited strings, array-based rules, Rule:: objects, and Livewire #[Rule] attributes all convert to FluentRule method chains.
// Before
return [
'email' => 'required|email|max:255',
'tags' => ['nullable', 'array'],
'tags.*' => 'string|max:50',
];
// After
return [
'email' => FluentRule::email()->required()->max(255),
'tags' => FluentRule::array()->nullable()->each(
FluentRule::string()->max(50),
),
];
Tested on a production codebase: 448 files converted, 3,469 tests still passing.
Installation
composer require --dev sandermuller/laravel-fluent-validation-rector
Requires PHP 8.3+, Rector 2.5+, and sandermuller/laravel-fluent-validation ^1.32.0. On an older fluent-validation, see the pin table.
Getting started
// rector.php
use Rector\Config\RectorConfig;
use SanderMuller\FluentValidationRector\Set\FluentValidationSetList;
return RectorConfig::configure()
->withPaths([__DIR__ . '/app'])
->withSets([FluentValidationSetList::ALL]);
vendor/bin/rector process --dry-run # preview
vendor/bin/rector process # apply
vendor/bin/pint # format
ALL runs converters, grouping and trait insertion. Three sets stay out of it on purpose and run as later passes: SIMPLIFY, POLISH, and SCHEMA.
Documentation
Full documentation lives at https://sandermuller.github.io/laravel-fluent-validation-rector/.
- Why this package? · Installation · Getting started · Sets
- String and array converters · Livewire attributes · Wildcard grouping · Trait insertion
- Simplify · Docblock polish · Adopting FluentSchema
- The
#[FluentRules]attribute · Configuration - Formatter integration · Diagnostics · Parity harness · AI assistant integration
- Rule reference · Detection and limitations
The sources are in docs/; the frozen public surface is in PUBLIC_API.md.
Testing
composer test # vendor/bin/pest
composer qa # format → rector → phpstan → test
The suite runs against Orchestra Testbench, so no host Laravel app is required.
Changelog
Release notes live in CHANGELOG.md and on the releases page.
Contributing
See CONTRIBUTING.md for the dev setup, test workflow, and PR conventions.
Security
Disclose vulnerabilities privately. See SECURITY.md.
Credits
License
MIT. See LICENSE.md.