Access to an undefined property $form
Inside a custom component with a Filament form how to keep PhpStan happy with error:
Access to an undefined property $formWhen I declare it
protected $form;
the fill method throws error:
Call to a member function fill() on nullType hinting with form
$form must not be accessed before initialization
2 Replies
Solution
Add a phpdoc
/** @property Form $form */
to the class@Dennis Koch wow you are rapid worked cheers