-
-
Notifications
You must be signed in to change notification settings - Fork 954
Normalize non-resource objects in a standalone normalizer #2679
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
Normalize non-resource objects in a standalone normalizer #2679
Conversation
ec28e96 to
d2b4e71
Compare
features/main/input_output.feature
Outdated
| "@type": "User", | ||
| "@id": "/users/1", | ||
| "dummy": "/dummies/1" | ||
| "dummy": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be handled better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be better to have @id as a string no?
|
seems cleaner (and better performance, I hope) |
18d5360 to
ecacda5
Compare
|
when using |
|
@teohhanhui my test case also covers @toriqo issue, should I duplicate it to make it run with other formats? |
|
@soyuka I'll take care of that, since I've been working on something since yesterday. |
4812d4e to
d9bb3c1
Compare
soyuka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it! Really good to have removed this handleNonResource parameter and I feel that the code is a step forward to simplify composition! Good job!
+100 |
31ea473 to
2893263
Compare
2893263 to
8f27927
Compare
8f27927 to
521fa98
Compare
|
Thanks @teohhanhui |
Note: Includes a minor BC break because we undo a new change introduced in 2.4. I think it's okay because
$handleNonResourcewas internal anyway. The only people affected would be those who have extendedAbstractItemNormalizerand explicitly pass that optional parameter (which, actually, still wouldn't result in an error anyway).TODO:
Handle circular reference across resource / non-resource?Don't care for now