From cc140ca1e3b798dc1e575086efd0a559cccfa7bb Mon Sep 17 00:00:00 2001 From: Filippo Montani <78483736+Carnicero90@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:10:39 +0100 Subject: [PATCH] Update rule stub removing reference to deprecated InvokableRule into rule.stub (using ValidationRule instead) --- stubs/rule.stub | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/stubs/rule.stub b/stubs/rule.stub index c0f30fc..e54d7ef 100644 --- a/stubs/rule.stub +++ b/stubs/rule.stub @@ -2,12 +2,18 @@ namespace {{ namespace }}; -use Illuminate\Contracts\Validation\InvokableRule; +use Closure; +use Illuminate\Contracts\Validation\ValidationRule; -class {{ class }} implements InvokableRule +class {{ class }} implements ValidationRule { - public function __invoke($attribute, $value, $fail) + /** + * Run the validation rule. + * + * @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail + */ + public function validate(string $attribute, mixed $value, Closure $fail): void { - // $fail('This rule failed'); + // } }