You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which means "pass a callable that's ready to accept either Nette\Forms\Form or SubmitButton". But users usually pass in a callable that only accepts "SubmitButton" and it looks like SubmitButton will only ever be passed as an argument:
This change causes PHPStan to report this error on valid code:
Array (array<callable(Nette\Forms\Controls\SubmitButton|Nette\Forms\Form, array|object): void>) does not accept Closure(Nette\Forms\Controls\SubmitButton, array): void.
Is my train of thought correct? Or should user's callables be ready to accept Form instance in some cases too?
The text was updated successfully, but these errors were encountered:
Version: 3.1.0
/cc @adaamz @milo @dg
This commit 2fce9b9 changed SubmitButton::$onClick type to:
Which means "pass a callable that's ready to accept either Nette\Forms\Form or SubmitButton". But users usually pass in a callable that only accepts "SubmitButton" and it looks like SubmitButton will only ever be passed as an argument:
forms/src/Forms/Controls/SubmitButton.php
Line 96 in 2fce9b9
This change causes PHPStan to report this error on valid code:
Is my train of thought correct? Or should user's callables be ready to accept Form instance in some cases too?
The text was updated successfully, but these errors were encountered: