Per #2843147-110: Add JSON:API to core as a stable module, we have some changes that need to happen before JSON:API 2.x can go into core.
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | 3032451-23.patch | 42.24 KB | wim leers |
| #23 | 3032451-23-do-not-test.patch | 41.52 KB | wim leers |
| #21 | 3032451-21.patch | 42.44 KB | wim leers |
| #21 | 3032451-21-do-not-test.patch | 41.72 KB | wim leers |
| #21 | interdiff.txt | 954 bytes | wim leers |
Comments
Comment #2
wim leers#3022531: (Re)move _json_api_params from JsonApiParamEnhancer and do not use denormalization for them landed, JSON:API Extras needs updating, this patch brings #3022531-16: (Re)move _json_api_params from JsonApiParamEnhancer and do not use denormalization for them to JSON:API Extras!
Comment #4
wim leersComment #5
wim leersComment #7
wim leersComment #9
wim leersRandom fail … 🥺
Comment #10
wim leers#3024896: Remove Relationship and RelationshipItem classes landed, JSON:API Extras needs updating. This adds #3024896-56: Remove Relationship and RelationshipItem classes to this patch!
Comment #11
wim leersSame thing for #3031210-5: If do_not_use_removal_imminent isn't true, then rename the service ID and tag.
Comment #12
gabesullice#3015438: Wrap entity objects in a ResourceObject which carries a ResourceType is not yet committed, but will be soon. This is the interdiff to make this patch compatible with the upstream once it lands.
I was bummed to see that I wasn't able to get this done before #3028493: EntityToJsonApi includes do not honor overridden fields landed. It would have been a nice concrete benefit since this would have fixed it, now it's just a code simplification. 🤷🏼♂️
Comment #13
gabesulliceA quick summarization of some things in #12:
After this interdiff is applied, all the entity level normalizers in this patch will use decoration rather than extension to alter JSON:API entity (de)normalization.
That should make them less prone to breakage and easier to maintain!
All of this is just unnecessary since #2997600: Resolve included resources prior to normalization and #2984911: Remove access to the Request object in the normalization process
This is what would have fixed #3028493: EntityToJsonApi includes do not honor overridden fields
Comment #14
e0ipso@gabesullice it looks like the interdiff attached does not apply on top of
3032451-11-do-not-test.patchin #11.The filename makes reference to the patch in #73 for the JSON:API issue. However the committed patch was #94. I suspect we need another iteration in the patch in #11 that contain these changes.
Comment #15
wim leersHm, I was being very careful, only committing after it was passing tests here, but apparently I made a mistake. Apologies. Will make sure you’ve got a passing patch later today.
Comment #16
e0ipsoNo need to apologize! It is also very likely that I did something wrong (I was still sleepy).
Comment #17
wim leersTurns out JSON:API Extras was depending on implementation details that trivial refactors removed, for example #3032818: Clean-up: \Drupal\jsonapi\Encoder\JsonEncoder::encode() should not have to deal with normalization logic. That'd explain why #14. Currently working on updated patch!
Comment #18
wim leersThis patch is relative to #11+#12: the interdiff here is on top of those two.
Comment #19
wim leersI uploaded #3033584: Follow-up for #3022531: Completely remove JsonApiParamEnhancer's interdiff :| Here is the right one.
Due to recent changes in JSON:API, I noticed that a few kernel tests in JSON:API Extras have been wrong for a very long time. It'd be great to convert them to functional tests to avoid being coupled to implementation details. But doing that is definitely out of scope here.
Comment #21
wim leers#3026085: Unable to POST new entities with client-generated UUID landed while I worked on this and broke my patch. Here's a reroll.
Comment #23
wim leersI rolled #21 wrong. (In #18 I got the patch right but the interdiff wrong, in #21 I got the interdiff right but the patch wrong 🙃)
Comment #25
e0ipso🙏🏽 you are fabulous!
Comment #27
e0ipsoSome additional commit credit for the fantastic lateral refactor.
Comment #29
wim leersWe had a bug in this: #3037833: Test coverage for config entity field enhancers.