Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #20945 [Serializer] Fix MaxDepth annotation exceptions (ogizanagi)
This PR was merged into the 3.1 branch. Discussion ---------- [Serializer] Fix MaxDepth annotation exceptions | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yesish (rather improving existing DX, the exception message is not always the most relevant) | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A I'd suggest to slightly change the `MaxDepth` value checks, as for instance setting a 0 value throws the following exception: > Parameter of annotation "Symfony\Component\Serializer\Annotation\MaxDepth" cannot be empty. where we should rather expect: > Parameter of annotation "Symfony\Component\Serializer\Annotation\MaxDepth" must be a positive integer. IMHO we could even keep the last one only, even if no value has been provided. Commits ------- 999f769 [Serializer] Fix MaxDepth annotation exceptions
- Loading branch information