v1.28.1
A performance patch for conditional wildcard validation. No runtime behaviour or
public API changed — validation verdicts are identical; the conditional path just
does less redundant work per item.
Performance
Memoized fast-check compilation on the sibling-conditional path
When a wildcard array carries sibling-dependent conditionals — required_if,
required_with, and the presence/value conditionals — each item can reduce to a
different effective rule set, so that path could not use the existing dispatch
cache and rebuilt its compiled fast-check closures for every single item. In the
common case where many items reduce to the same rule set (e.g. most rows take
the same conditional branch), that work was repeated needlessly.
These compiled fast-checks are now memoized per distinct reduced rule set, keyed
by the same content-sensitive key the per-item validator cache already uses. The
reduction itself still runs per item (it depends on each item's data); only the
fast-check assembly is reused. Larger arrays with repeated conditional shapes do
proportionally less compilation work.
The change is internal to the validation engine. Verdicts are unchanged, covered
by the existing conditional/parity suites plus dedicated cache-correctness tests.
Internal
- Added an
UPGRADING.mdupgrade guide at the repository root (documents the 1.28
Laravel 11 support drop). It is a GitHub-facing document and is not part of the
distributed package.
Full Changelog: 1.28.0...1.28.1
Benchmark results
| Scenario | Optimizations | Native Laravel | Optimized | Speedup |
|---|---|---|---|---|
| Product import — 500 items, simple rules | Wildcard, fast-check | 191.9ms | 2.6ms | ~73x |
| Nested order lines — 1000 orders × 5 line items | Wildcard, fast-check (nested) | 3272.9ms | 15.9ms | ~206x |
| Event scheduling — 100 items, field-ref dates | Wildcard, partial fast-check | 26.3ms | 0.9ms | ~31x |
| Article submission — 50 items, custom Rule objects | Wildcard only | 8.7ms | 2.8ms | ~3x |
| Conditional import — 100 items, 47 conditional fields | Wildcard, pre-evaluation | 2599.2ms | 57.7ms | ~45x |
| Login form — 3 fields, no wildcards | Fast-check (flat) | 0.1ms | 0.0ms | ~17x |