psalm-plugin-symfony
psalm-plugin-symfony copied to clipboard
Stubs for extended form types
When form types are created from controller like this:
public function __invoke()
{
$form = $this->createForm(SearchType::class);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$code = $form->getData(); // <--- mixed
}
}
psalm thinks it is mixed.
These 3 stubs fixes cases that all work with string. In few weeks, I will add other types after I confirm returned data.
I see tests are failing only on Symfony4, but I can't see the reason for that. Any help?