`FormBuilderInterface::getForm()` should not return `FormInterface<TData|null>`, but `FormInterface<TData>`?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
Research direction
Start with stubs/Symfony/Component/Form/FormBuilderInterface.stub, especially lines 14–17, and compare its generic return type with Symfony's FormBuilderInterface contract and the stated FormInterface usage. The work is done when the stub accurately models getForm() for a FormBuilderInterface without incorrectly propagating null, with the relevant project checks passing.
Written by the indexing model from the issue text.
Description
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!
- Dominant language
- PHP
- Stars
- 800
- Forks
- 104
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phpstan/phpstan-symfony
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
phpstan/phpstan-symfony#510 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
phpstan/phpstan-symfony#494 · 5 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
phpstan/phpstan-symfony#268 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
phpstan/phpstan-symfony#509 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
phpstan/phpstan-symfony#455 · 8 comments · 1 reaction ·
All issues in phpstan/phpstan-symfony
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·