Closed (fixed)
Project:
Consumer Image Styles
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Feb 2019 at 19:14 UTC
Updated:
5 Mar 2019 at 21:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersI can't run tests here, because HEAD's tests are failing on DrupalCI. Locally, they're passing just fine though. Furthermore, this needs #3032451: Compatibility with upcoming JSON:API 2.2 release: JSON:API Extras 3.4 to be committed first; there's AFAIK no way for us to test this against JSON:API 2.x-dev + JSON:API Extras with that patch applied.
#3031210: If do_not_use_removal_imminent isn't true, then rename the service ID and tag landed, Consumer Image Styles needs updating. This adds #3031210-9: If do_not_use_removal_imminent isn't true, then rename the service ID and tag to this patch!
Comment #3
wim leersSee #3015438-85: Wrap entity objects in a ResourceObject which carries a ResourceType.6 — @gabesullice will be doing one more reroll of this :)
Comment #4
gabesulliceThis adds support to the patch in #2 for #3015438-89: Wrap entity objects in a ResourceObject which carries a ResourceType.
Note, there is a static method on
LinkCollectionNormalizercalledaddLinkRels. This is there to keep the output exactly as it is in HEAD. However, I think this can/should be removed. Consumer Image Styles jumped ahead of JSON:API by providing link rels. JSON:API does not currently normalize link rels because there isn't spec support for it. We're waiting for something like https://github.com/json-api/json-api/pull/1348 to land.To prevent from having to maintain BC support for
meta.rel, I recommend that ^ method be removed from this module before a stable release of 3.x is made.Comment #5
gabesulliceInjecting the request stack means that this normalizer does not rely on
$context['request'], which is a hidden dependency on JSON:API internals.This is what I recommend be removed.
Comment #6
wim leersFixing two nits in #4.
Comment #7
wim leers#4's diffstat:
3 files changed, 98 insertions, 123 deletions.. It uses the facilities that have been introduced by #2994193: [META] The Last Link: A Hypermedia Story, and ends up makingconsumer_image_stylessignificantly simpler! 🥳If #5.2 is done by @e0ipso, then it even becomes
5 files changed, 160 insertions(+), 226 deletions(-)! Patch attached that implements the suggestion in #5.2 by Gabe (it applies on top of #6), tests still are green ✅Comment #8
e0ipsoThanks so much for the patches!
There hasn't been any kind of movement (except for me trying to generate GH notifications to draw attention to it) in the issue. Do you reckon this will land soon now that you are an editor of the spec?
I think I will leave it like this and wait for things to settle before tagging a RC. If it takes too long, I'll keep the current structure around and deprecate it in the next version.
Comment #9
gabesullice👍
Comment #10
gabesullice@ethan.resnick has promised to post a review soon. Since it targets v1.2, I think it will still take some time (months, hopefully) before any link stuff lands in the spec.
Once there are some initial thoughts on it and the direction doesn't seem to have shifted in a totally different direction, we could make a profile out of it and implement it right away. BC for the profile's vs the spec-level links could be maintained by having a different LinkCollection normalizer for each.
Comment #12
e0ipsoThanks so much for this!