Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #45702 [Form] Fix the usage of the Valid constraints in array-bas…
…ed forms (stof) This PR was merged into the 4.4 branch. Discussion ---------- [Form] Fix the usage of the Valid constraints in array-based forms | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a This is a bug introduced in #39333. When wanting to exclude scalar forms, it also excluded array forms. The code now uses the same `\is_object($data) || \is_array($data)` condition for `Valid` constraint than the condition it uses as part of the `$validateDataGraph` condition. The new tests reflects my own use case: an unmapped collection field, were we want to run the validation on that subtree (which is not traversed for other reasons due to being unmapped, and so we need `Valid`). This was working fine in older versions of Symfony, but the validation was silently skipped in 4.4.18+. Commits ------- 542c2fb Fix the usage of the Valid constraints in array-based forms
- Loading branch information