Skip to content
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

[Validator] Fixed calling getters before resolving groups #36245

Merged

Conversation

HeahDude
Copy link
Contributor

Q A
Branch? 3.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #9939
License MIT
Doc PR ~

@HeahDude HeahDude force-pushed the validator-fix-getters-in-sequence branch 2 times, most recently from 6c68c39 to 4c91f52 Compare March 28, 2020 10:46
@HeahDude HeahDude force-pushed the validator-fix-getters-in-sequence branch from e802cf8 to edcfd60 Compare March 28, 2020 11:31
@nicolas-grekas
Copy link
Member

Thank you @HeahDude.

@nicolas-grekas nicolas-grekas merged commit b9c2693 into symfony:3.4 Mar 31, 2020
@HeahDude HeahDude deleted the validator-fix-getters-in-sequence branch March 31, 2020 18:50
nicolas-grekas added a commit that referenced this pull request Apr 18, 2020
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fixed handling groups sequence validation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | FIx #9939 (comment), Fix #35556
| License       | MIT
| Doc PR        | ~

This is not the same as the original issue fixed by #36245, that was reported in #9939 (comment).

The form also fails to cascade sequence validation properly because each nested field is validated against the sequence, and one can fail at a step independently from another which could failed in another step. I've added a lot of tests to ensure this is working properly and tested in a website skeleton too.

This PR aims to close #35556 which tries to fix the same issue but afterwards in its implementation as said in #35556 (comment).

Commits
-------

dfb61c2 [Form] Fixed handling groups sequence validation
This was referenced Apr 28, 2020
@bendavies
Copy link
Contributor

bendavies commented Apr 29, 2020

this is buggy. it breaks traversal of getters returning collections annotated with Valid constraints.
I will PR if someone doesn't first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants