Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not deserialize object if all properties have not type #1102

Closed
surikman opened this issue Jun 28, 2019 · 2 comments · Fixed by #1103
Closed

Could not deserialize object if all properties have not type #1102

surikman opened this issue Jun 28, 2019 · 2 comments · Fixed by #1103
Labels

Comments

@surikman
Copy link

Q A
Bug report? yes
Feature request? no
BC Break report? yes #1080
RFC? no
Affected version 1.3.0

Steps required to reproduce the problem

  1. Create e.g. AbstractClass with some private property (e.g.: metadata)
  2. Create User which extends AbstractClass and add some property to this User (e.g.: username)
  3. add @Type("string") as deserialization type
  4. Deserialize json {"username": "JohnDoe"} to User

Expected Result

  • class User will have filled property username with string "JohnDoe" and AbstractClass will have still null private property metadata

Actual Result

  • Exception: You must define a type for AbstractClass::$metadata.

Problem:

src/GraphNavigator/DeserializationGraphNavigator.php
This BC Break comes from #1080

@goetas
Copy link
Collaborator

goetas commented Jun 28, 2019

Can you provide a failing test case that works before #1080 and does not after?
I stil can not figure it out...

Never mind, see #1103

@surikman
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants