Closed (fixed)
Project:
Drupal core
Version:
8.5.x-dev
Component:
serialization.module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Sep 2017 at 12:10 UTC
Updated:
24 Nov 2017 at 13:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersComment #3
wim leersComment #4
wim leersComment #5
wim leersSee #2910211: Allow computed exposed properties in ComplexData to support cacheability. and #2910211: Allow computed exposed properties in ComplexData to support cacheability. — those interdiffs removed the changes that are now deferred to this issue.
Comment #6
tedbowIn #2871591: Allow ComplexData in TypedData to specify computed properties that should be exposed in normalization and other contexts which is now at comment #133 it is now clear that we need point out caching will work with the patch so I am starting this issue.
This patch is adding back the cache logic that was taken out in comment #78 of that issue.
Specifically this shows why we need the \Drupal\entity_test\Plugin\DataType\ComputedString as example of data that will need to be cache aware. As will be the case in #2626924: Include processed text in normalizations: "text" field type's "processed" computed property should be non-internal and carry cacheability metadata
Comment #7
tedbowOk. now that #2871591: Allow ComplexData in TypedData to specify computed properties that should be exposed in normalization and other contexts is RTBC here is reroll. Had to make some changes to this b/c of changes on that issue.
Comment #9
tedbowComment #10
wim leers👍
8.5.0
Nit: This change is unnecessary.
ResourceResponseSubscriberare necessary.Comment #11
tedbow@Wim Leers thank for review.
#10
1. Fixed
2. fixed
3. yes. need to happen but seems like the test only patch will make more sense after #2871591: Allow ComplexData in TypedData to specify computed properties that should be exposed in normalization and other contexts
Comment #12
wim leersTrue!
So I think this is now really postponed.
Comment #13
wim leers#2871591: Allow ComplexData in TypedData to specify computed properties that should be exposed in normalization and other contexts landed.
Straight rebase of #11. Matches #11's
diff-2871591-160.txtexactly :)Comment #14
wim leersThis blocks #2825487: Fix normalization of File entities: file entities should expose the file URL as a computed property on the 'uri' base field, #2825812: ImageItem should have an "derivatives" computed property, to expose all image style URLs, #2626924: Include processed text in normalizations: "text" field type's "processed" computed property should be non-internal and carry cacheability metadata and #2577923: MenuLinkContent entities pointing to nodes are not deployable: LinkItem should have a "target_uuid" computed property, all of which are 8.5 REST top priorities (#2905563: REST: top priorities for Drupal 8.5.x), and have been REST top priorities for >1 year, which definitely makes this major, just like #2871591: Allow ComplexData in TypedData to specify computed properties that should be exposed in normalization and other contexts.
Comment #15
wim leers#2864816: HAL LinkManager doesn't add 'url.site' cache context when needed is making the exact same changes. But that patch was also reviewed by @dawehner, and had some additional remarks. So, bringing over the changes from that issue to this one.
Comment #16
wim leersResourceResponseSuscriberare half of the crucial changes in this issue, and that was also RTBC'd in #2864816NormalizerBase::addCacheableDependency()plusTypedDataNormalizer::normalize()using it are the other half of crucial changes. This also comes with explicit functional test coverage. I think those changes are sound too.Therefore RTBC'ing.
Comment #17
larowlanthis should use the constant
Other than that, feels like I've reviewed this elsewhere ;) - oh right - #2864816: HAL LinkManager doesn't add 'url.site' cache context when needed
Do you have a preference for the order they go in?
Comment #18
wim leersAgreed, done. Trivial change, so back to RTBC.
This issue blocks many others (see #14), so this going in first would make sense!
Comment #20
larowlanFixed on commit
Committed as 52a598e and pushed to 8.5.x.
Published change record
Comment #21
wim leersYAAAAAYYYYYYY 🍾 After about a year, the issues mentioned in #14 are finally unblocked!
Rerolled them all:
Comment #22
wim leersThis also unblocked #2864816, that's now back at RTBC: #2864816-46: HAL LinkManager doesn't add 'url.site' cache context when needed.
Comment #23
wim leersFollow-up created: #2922487: Follow-up for #2910211: fix all deprecation warnings.