Normalize non-resource objects in a standalone normalizer#2679
Conversation
ec28e96 to
d2b4e71
Compare
| "@type": "User", | ||
| "@id": "/users/1", | ||
| "dummy": "/dummies/1" | ||
| "dummy": { |
There was a problem hiding this comment.
This should probably be handled better?
There was a problem hiding this comment.
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.
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