You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: implement unified pipeline architecture with hybrid execution model
- Refactor FieldValidator to use single conceptual pipeline with optimal execution
- Hybrid model: error collection for pure validations, fail-fast for transformations
- Execution order guarantee: methods execute exactly as written in fluent chains
- Maintain backward compatibility: all 135 tests pass with 390 assertions
- Performance optimized: no unnecessary error collection overhead
- Update comprehensive documentation across AGENTS.md, CHANGELOG.md, IDEAS.md, README.md, ROADMAP.md
BREAKING CHANGE: None - fully backward compatible architectural improvement
-**Type-Aware Transformations** - Revolutionary `transform()` and `pipe()` system with intelligent type context switching
30
+
-**Unified Pipeline Architecture** - Single conceptual pipeline with hybrid execution (error collection for validations, fail-fast for transformations)
30
31
-**Custom Validation** - Enhanced `satisfies()` method accepting `FieldValidator` instances or callables with optional error messages (all internal validators migrated from deprecated `addValidation()`)
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
## [Unreleased]
6
6
7
7
### Added
8
+
-**Unified Pipeline Architecture**: Revolutionary single pipeline design that maintains conceptual clarity while optimizing execution
9
+
-**Hybrid Execution Model**: Pure validations (like `email()`, `minLength()`) collect all errors for better UX, while transformations (like `required()`, `pipe()`) fail fast for correct behavior
10
+
-**Execution Order Guarantee**: All methods execute in the exact order written in the fluent chain - `->email()->required()->pipe('trim')` works exactly as expected
11
+
-**Conceptual Simplicity**: From developer perspective, there's one pipeline where callbacks do whatever they need (validate, transform, or both)
12
+
-**Performance Optimized**: Error collection only where beneficial, fail-fast where appropriate
13
+
-**Backward Compatible**: All existing code works unchanged, all 135 tests pass with 390 assertions
14
+
-**Internal Architecture**: Maintains separate `$validations` (error collection) and `$pipeline` (transformations) arrays for optimal execution
8
15
-**New `satisfies*` API**: Enhanced instance logical combinators for improved API consistency and flexibility
9
16
-`satisfiesAny(array $validations, ?string $message = null)` - Validates that value passes ANY of the provided validators or callables
10
17
-`satisfiesAll(array $validations, ?string $message = null)` - Validates that value passes ALL of the provided validators or callables
- ✅ Fixed execution order for required() and nullifyEmpty() methods to respect fluent API contract
61
61
- ✅ New `satisfies*` API for enhanced instance logical combinators with improved consistency
62
62
- ✅ Refactored `oneOf()` to `OneOfTrait` for better type safety and execution order
63
+
- ✅ **Unified Pipeline Architecture** - Revolutionary single conceptual pipeline with hybrid execution model for optimal performance and developer experience
64
+
```php
65
+
// From developer perspective: One pipeline, execution order guaranteed
66
+
$validator = Validator::isString()
67
+
->email() // Pure validation (error collected)
68
+
->minLength(5) // Pure validation (error collected)
0 commit comments