Thanks to visit codestin.com
Credit goes to github.com

Skip to content

some tweaks #1

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

Closed
wants to merge 1 commit into from
Closed

Conversation

xabbuh
Copy link

@xabbuh xabbuh commented May 20, 2020

No description provided.

// Skip unitialized properties on $data
$this->catchUninitializedPropertyException($e);
}
$form->setData($this->getPropertyValue($data, $propertyPath));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

symfony#36492 (comment)

This sets null for properties that are not-nullable typed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid I do not understand what you mean. If we didn't have this call at all, the value would already be null. So what would be the difference here? Do you have an example test case which we could add that would show the difference?

Comment on lines -375 to +374
class NotSynchronizedForm extends SubmittedForm
class NotSynchronizedForm extends Form
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check is implemented as

if (null !== $propertyPath && $config->getMapped() && $form->isSubmitted() && $form->isSynchronized() && !$form->isDisabled()) {

If the form is not submitted, the test provides a false negative for $form->isSynchronized() because it is never called.

@xabbuh xabbuh closed this Jul 8, 2020
@xabbuh xabbuh deleted the pr-36492 branch July 8, 2020 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants