symfony-docs icon indicating copy to clipboard operation
symfony-docs copied to clipboard

Update serializer example using type hints

Open 94noni opened this issue 2 years ago • 1 comments

Hi, small proposition to upgrade code example here in the serializer doc using type hint on object to serialize to make example more robust from the input to output

Before continuing on this page, I want to ask if it is useful or not Thank you!

94noni avatar Jun 14 '22 12:06 94noni

I like this proposal. @wouterj do you agree on adding this in 6.0 branch and up? Thanks!

javiereguiluz avatar Jun 14 '22 15:06 javiereguiluz

My vote is 👍 ... but please only update this article and not all docs but that would create multiple hard-to-solve merge conflicts. Thanks!

But first, let's wait to read the opinion of @xabbuh and @OskarStark. Thanks!

javiereguiluz avatar Oct 06 '22 15:10 javiereguiluz

:+1: for 4.4 and up. This is what we have done in most other cases and will result in the least merge difficulty.

(Javier, if you want me to take care of (up-)merging this let me know)

wouterj avatar Oct 06 '22 19:10 wouterj

Antoine, thanks for this improvement. Merged!

javiereguiluz avatar Oct 26 '22 15:10 javiereguiluz