- last update
almost 2 years ago Composer require failure
Thanks for addressing the feedback in the four issues I created — now it's much easier to scan and understand the code base! 👏
Because it's now easier to understand, I can now focus on an area I glossed over in my first review round: \Drupal\jsonapi_hypermedia\Plugin\LinkProviderManager::bubbleAccessCacheability()
.
AFAICT you're doing this bubbling in the link provider manager because it must return LinkCollection
, which cannot carry cacheability. So I think you're choosing to design the link provider manager in a future-proof way by passing cacheability out-of-band to the normalizer, in hopes that when
#3055889: JsonApiResource\Link objects with inaccessible target urls should not be normalized →
lands, it will add cacheability carrying support to both \Drupal\jsonapi\JsonApiResource\LinkCollection
and \Drupal\jsonapi\JsonApiResource\Link
.
When that happens, it would allow you to remove the render context-wrapping complexity in \Drupal\jsonapi\Normalizer\JsonapiHypermediaImpostor\JsonApiHypermediaLinkCollectionNormalizer::normalize()
and you would be able to remove \Drupal\jsonapi_hypermedia\Plugin\LinkProviderManager::bubbleAccessCacheability()
.
Is that a correct interpretation?
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.