I think https://github.com/phpstan/phpstan-symfony/blob/2.0.x/stubs/Symfony/Component/Form/FormBuilderInterface.stub#L14-L17 is wrong: when I'm carrying around a FormBuilderInterface<SomeModel>, I would expect to build a form for a function that receives FormInterface<SomeModel>.
Indeed, then FormInterface::getData() would return SomeModel|null, but that would not be a requirement for FormBuilderInterface::getForm() to return FormInterface<SomeModel|null>. But maybe I'm missing something obvious here!
I think https://github.com/phpstan/phpstan-symfony/blob/2.0.x/stubs/Symfony/Component/Form/FormBuilderInterface.stub#L14-L17 is wrong: when I'm carrying around a
FormBuilderInterface<SomeModel>, I would expect to build a form for a function that receivesFormInterface<SomeModel>.Indeed, then
FormInterface::getData()would returnSomeModel|null, but that would not be a requirement forFormBuilderInterface::getForm()to returnFormInterface<SomeModel|null>. But maybe I'm missing something obvious here!