psalm-plugin-symfony icon indicating copy to clipboard operation
psalm-plugin-symfony copied to clipboard

Stubs for extended form types

Open zmitic opened this issue 3 years ago • 1 comments

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.

zmitic avatar Apr 20 '22 13:04 zmitic

I see tests are failing only on Symfony4, but I can't see the reason for that. Any help?

zmitic avatar Apr 20 '22 14:04 zmitic