Open King2500 opened 9 years ago
It would be cool, if you could implement a TypeProvider for Form::get('child') method result.
Form::get('child')
PhpStorm can't understand the correct result, because of the generic FormInterface:
FormInterface
You already "detect" the Form types when autocompleting: (though FormInterface and FormTypes are not the same here)
In this case its return type is Symfony\Component\Form\SubmitButton.
Symfony\Component\Form\SubmitButton
Known types from Form component (implementing FormInterface):
Symfony\Component\Form\Button
All other form fields are of type:
Symfony\Component\Form\Form
I think this could work similar to your get('service') TypeProvider?
get('service')
get was blocked by service container type provider. this api limit was hopefully fixed in phpstorm8. we will see :)
get
It would be cool, if you could implement a TypeProvider for
Form::get('child')
method result.PhpStorm can't understand the correct result, because of the generic
FormInterface
:You already "detect" the Form types when autocompleting: (though FormInterface and FormTypes are not the same here)
In this case its return type is
Symfony\Component\Form\SubmitButton
.Known types from Form component (implementing
FormInterface
):Symfony\Component\Form\Button
Symfony\Component\Form\SubmitButton
All other form fields are of type:
Symfony\Component\Form\Form
I think this could work similar to your
get('service')
TypeProvider?