Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Form] compound forms without children should be considered rendered implicitly#20108
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
backbone87 commentedSep 30, 2016
hm somehow the first commit from#20080 is missing here? |
linaori commentedSep 30, 2016
Could be related to the revert? |
backbone87 commentedSep 30, 2016
yes but how do i get it back, do i need to make a new commit or can this just be merged manually via cherrypicking? |
HeahDude commentedSep 30, 2016
try to amend it to change its hash |
backbone87 commentedOct 2, 2016
have rebased it onto current 2.7 and collapsed both commits |
backbone87 commentedOct 3, 2016
@fabpot you have added this bugfix to the 2.7.19 tag, though you reverted the first PR, pls check this one, as the failing test cases are fixed, maybe@webmozart should also review this |
HeahDude commentedOct 3, 2016
@backbone87 since you modify abstract tests of the Form component, you have to update both TwigBridge and FrameworkBundle dependency to it in their Be sure to run tests on them before pushing, thanks. |
HeahDude commentedOct 4, 2016
OK, I confirm tests are green. Status: Reviewed |
| ->add($this->factory | ||
| ->createNamedBuilder('child','form',null,array('error_bubbling' =>false)) | ||
| ->add('grandChild','form') | ||
| ->add('grandChild','text') |
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.
Why this change?
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.
$form->createView()->isRendered() now returns true, when the whole form tree is compound and would result in this test case failing.
The real change is for$grandChild->createView()->isRendered() which now returns true in case grandChild is compound. This is because compound forms with no children are considered rendered now, where before each leaf form view (that includes compound forms without children), that doesnt have its rendered flag explicitly set, would not be considered rendered.
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.
Ok it was reverted when I tried on master because of the conflict resolution. So I think you should not make that change and fix the layout test in this case because it does impactform_rest and this should be tested too.
backbone87 commentedOct 4, 2016
i would still recommend to wait for a review of@webmozart consider the following usecase: $form =$factory->create(FormType::class, ['items' => [] ]);$form->add('items', CollectionType::class, ['entry_type' => TextType::class ]); and the following tpl: {{ form_start(form) }} {{ form_errors(form) }} {{ form_row(form.items) }}{{ form_end(form) }}with this change also see#20080 (comment) for more |
HeahDude commentedOct 4, 2016
Status: Needs Work |
HeahDude commentedOct 4, 2016
Sorry I've got the message with delay, yes the choice type is definitely a problem, let's solve this with#17609 instead. |
nicolas-grekas commentedJan 21, 2018
@backbone87@HeahDude what's the status here? (rebase needed) |
fabpot commentedMar 31, 2018
Closing as there is no more activity. |
second try, obsoletes#20080