-
Notifications
You must be signed in to change notification settings - Fork 94
Add FormTypeExtensionInterface stub #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FormTypeExtensionInterface stub #108
Conversation
Thank you for writing phpstan! I accept the code of conduct in phpstan/phpstan-src Greetings |
Hi, what kind of bug this solves? Thank you. |
use \Symfony\Component\Form\FormTypeExtensionInterface;
Class MyTypeExtension implements FormTypeExtensionInterface
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
}
\ phpstan would say:
its the same case as the FormTypeInterface Stub |
How does the |
e.g. for a collection type [
'entry_type' => EmailType::class,
'entry_options' => [
'attr' => ['class' => 'email-box'],
],
]); basically everything mentioned here https://symfony.com/doc/current/reference/forms/types.html#other-fields |
So is it |
yes sir, exactly as stated in the stub |
interface FormTypeExtensionInterface | ||
{ | ||
/** | ||
* @param array<mixed> $options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the correct type
Nope, your stub says |
arg, right 👍 but then its the same case as for should I create a PR to fix it there, too? |
Push the fix here in this PR, thanks. |
48cf529
to
5a1e3f3
Compare
Thank you, tagged as 0.12.10. |
Since it implements nearly the same interface, but isn't typehinted either ($options missing iterable type)
How can I test that?