v1.29.0
Turns a silent validation bypass into a loud, actionable error. A wildcard rule
key written incorrectly used to apply no validation and let invalid data
through unnoticed; it now fails fast with a corrective hint.
Behaviour change
Malformed wildcard rule keys now throw instead of being silently skipped
A wildcard rule key must contain a .* segment (e.g. items.*.name, or
items.* for a scalar list). A key with a * outside a .* segment — the typo
items* (missing the dot), or a root-level * / *.foo — previously computed an
empty parent internally and was dropped before validation ran. The rule applied
nothing and invalid data passed silently.
Such keys now throw InvalidArgumentException with a corrective hint:
Malformed wildcard rule key [items*]: a wildcard segment must be written as '.*'
(e.g. 'items.*.name'). Did you mean 'items.*'?
This matches the package's existing fail-fast on malformed array-rule keys.
Impact: correctly-formed rules (items.*.name, items.*, addresses.*.postcode,
…) are unaffected — verdicts are identical. Only a previously-malformed key, which
was silently doing nothing, now surfaces as an error. If you hit this on upgrade,
it has been masking a rule that never ran: fix the key to use .*. Root-level
wildcards (*, *.foo) are not supported — nest rules under a named key
(field.*).
Internal
- Added characterization/regression tests pinning the behaviour of each wildcard
key shape.
Full Changelog: 1.28.1...1.29.0
Benchmark results
| Scenario | Optimizations | Native Laravel | Optimized | Speedup |
|---|---|---|---|---|
| Product import — 500 items, simple rules | Wildcard, fast-check | 233.8ms | 3.2ms | ~72x |
| Nested order lines — 1000 orders × 5 line items | Wildcard, fast-check (nested) | 2904.0ms | 18.1ms | ~160x |
| Event scheduling — 100 items, field-ref dates | Wildcard, partial fast-check | 32.9ms | 1.0ms | ~32x |
| Article submission — 50 items, custom Rule objects | Wildcard only | 10.7ms | 3.4ms | ~3x |
| Conditional import — 100 items, 47 conditional fields | Wildcard, pre-evaluation | 3637.5ms | 71.9ms | ~51x |
| Login form — 3 fields, no wildcards | Fast-check (flat) | 0.2ms | 0.0ms | ~16x |