Skip to content

v1.33.0

Latest

Choose a tag to compare

@SanderMuller SanderMuller released this 16 Jul 16:34
Immutable release. Only release title and notes can be modified.

A request that defines only schema() can now call ->rules() and get the rules
the builder produced, so tooling or interop that expects a rules() method works
with schema-only requests.

Added

  • rules() on schema-only requests. HasFluentRules now declares a rules()
    method that returns schema()'s output (the raw field map) when a request has
    not defined its own rules(). It works whether the request was resolved through
    the container or instantiated directly. A rules() you define yourself still
    takes precedence — the validator detects a consumer-declared rules() and only
    then treats it as a rule source, so the fallback never merges with itself.

Upgrading

  • HasFluentRules now declares public function rules(): array|RuleSet. A rules()
    you define must be compatible with that signature: public, returning array or
    RuleSet (Laravel's scaffolded rules(): array already is). Untyped or
    non-public rules() methods need a small adjustment — see
    UPGRADING.md.

What's Changed

  • chore(deps): bump actions/cache from 5 to 6 by @dependabot[bot] in #19

Full Changelog: 1.32.0...1.33.0


Benchmark results

Scenario Optimizations Native Laravel Optimized Speedup
Product import — 500 items, simple rules Wildcard, fast-check 229.5ms 3.3ms ~69x
Nested order lines — 1000 orders × 5 line items Wildcard, fast-check (nested) 2940.0ms 19.0ms ~155x
Event scheduling — 100 items, field-ref dates Wildcard, partial fast-check 33.1ms 1.0ms ~32x
Article submission — 50 items, custom Rule objects Wildcard only 10.6ms 3.0ms ~4x
Conditional import — 100 items, 47 conditional fields Wildcard, pre-evaluation 3709.7ms 51.7ms ~72x
Login form — 3 fields, no wildcards Fast-check (flat) 0.2ms 0.0ms ~15x