Closed (fixed)
Project:
JSON:API Extras
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Feb 2019 at 17:57 UTC
Updated:
10 Apr 2019 at 11:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gabesullice#3032679: Clean-up: rename EntityCollection to Data requires either the attached patch or #3035045: Make EntityToJsonApi use subrequests so that it never breaks again to be committed.
Comment #3
gabesulliceGiven @e0ipso's response in #3035045: Make EntityToJsonApi use subrequests so that it never breaks again, I'm going to assume that's the preferred approach. Therefore, this patch will not incorporate the patch attached to #2. Therefore, any patch in this issue must be applied on top of #3035045.
First, up, we need to account for #3033473: Clean-up: Remove LinkManager, luckily, we already have a patch for that. Attached.
Next, we need to account for #3035149: Use ResourceObjectData with cardinality 1 for individual responses. Easy, that's a 2-line, test only change.
Finally, I'm adding a composer change to the
do-not-commitpatch so that it gets tested with the latest JSON:API commit.Comment #4
wim leers#3039600: Update JSON:API Extras' route for compatibility with JSON:API 2.4 will also need to happen for this.
Comment #5
wim leersPer #3, #3035045: Make EntityToJsonApi use subrequests so that it never breaks again should land first, and hence I've rerolled #3035045 to address @e0ipso's feedback, see #3035045-8: Make EntityToJsonApi use subrequests so that it never breaks again, hopefully that'll get committed soon :)
Comment #6
wim leers#3035045: Make EntityToJsonApi use subrequests so that it never breaks again landed :) Re-testing #3, but I suspect it'll need a
refillreroll (hahah autocorrect :D).Comment #7
e0ipsoThis should be down to a single fail. It's a 403 I'm not sure where it's coming from. Printing the response does not yield an explanation.
Comment #8
wim leersHere's an interdiff showing the changing between #3 and #7. (#3's changes in
EntityToJsonApiTestare dropped because #3035045: Make EntityToJsonApi use subrequests so that it never breaks again made them irrelevant.)+1 to #7 👍
Comment #9
wim leersReproduced the 403 that #7 mentioned.
It's the same problem we're seeing in #3042124: [regression] Empty response body when user is an administrator and an exception is thrown; some traces cannot be encoded because of recursion detection..
Comment #11
wim leersAfter more hours of debugging than I'd like, I discovered the root cause: #3038308: Avoid translations DELETE data loss and unintended changes with PATCH and test all methods against entity route parameter translation upcasting removed the
basic_authmodule as one of the installed-by-default modules. JSON:API Extras was using Basic Auth for authentication. So this is just another occurrence of #3027890: When trying to use `Authorization: Basic …` header and basic_auth module is not installed, warn user.Comment #13
e0ipsow00t! Made some cosmetic changes to avoid PHPCS issues on commit.
Thanks!
Comment #14
wim leersGreat! Next: #3036904-14: Decorate JSON:API's normalizers and fake its namespace so JSON:API can eliminate its Serializer's fallback behavior. :)
Comment #15
wim leersOh, and #3039600: Update JSON:API Extras' route for compatibility with JSON:API 2.4 of course!