You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor symfony#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
0 commit comments