Skip to content

1.1.0

Latest

Choose a tag to compare

@riasvdv riasvdv released this 22 Apr 11:02

Adds a ->withScenario method

If you only want to switch scenarios for one operation, use withScenario(). The previous scenario is restored after the callback returns or throws.

$validated = $data->ruleset->withScenario(
    PostRuleset::SCENARIO_DRAFT,
    fn () => $data->ruleset->validate(),
);

Full Changelog: 1.0.2...1.1.0