Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Register the ArrayDenormalizer#20480
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
jvasseur commentedNov 10, 2016
Not sure if this should be treated as a bugfix, people could use some specific array denormalizers, adding the generic one could make their application use it instead of their specific denormalizers leading to bugs. |
dunglas commentedNov 10, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This is very unlikely because:
However the bug is real and annoying. Anytime you try to deserialize a document containing an embedded collection, Symfony fails with a an error hard to understand for newcomers ( |
1a67e2b to8c5b756Comparexabbuh commentedNov 11, 2016
👍 I always registered this one on my own in my applications, but having this done for me in core is much nicer. Status: Reviewed |
fabpot commentedNov 11, 2016
Thank you@dunglas. |
This PR was squashed before being merged into the 3.1 branch (closes#20480).Discussion----------[FrameworkBundle] Register the ArrayDenormalizer| Q | A| ------------- | ---| Branch? | 3.1| Bug fix? | yes| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aRegisters the `ArrayDenormalizer` class in FrameworkBundle.**Why it's a bug fix?**Because since 3.1, most normalizers are able to deserialize complex types (e.g.: an object embedded in an object). They use the `Class\Name[]` notation to handle collections.However, this only works when the `ArrayDenormalizer` has been registered (it is responsible of handling the `[]` notation).We do it manually in unit tests, but `ArrayDenormalizer` has never been integrated in FrameworkBundle.See the test case for further details.Commits-------2eedafc [FrameworkBundle] Register the ArrayDenormalizer
… case (xabbuh)This PR was merged into the 2.8 branch.Discussion----------[FrameworkBundle] add missing functional Serializer test case| Q | A| ------------- | ---| Branch? | 2.8| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |This is needed to make the test introduced in#21370. It basically backports the functional test config as introduced by@dunglas in#20480.Commits-------24243ac add missing functional Serializer test case
Uh oh!
There was an error while loading.Please reload this page.
Registers the
ArrayDenormalizerclass in FrameworkBundle.Why it's a bug fix?
Because since 3.1, most normalizers are able to deserialize complex types (e.g.: an object embedded in an object). They use the
Class\Name[]notation to handle collections.However, this only works when the
ArrayDenormalizerhas been registered (it is responsible of handling the[]notation).We do it manually in unit tests, but
ArrayDenormalizerhas never been integrated in FrameworkBundle.See the test case for further details.