Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
Per #3070430: Incompatible with JSON:API Extras, modules such as JSON:API cross bundles also decorate the resource type repository, but jsonapi_extras
' typehints and business logic isn't friendly to such extension. This is relatively easily addressed by typehinting against the repository's interface, and doing some special handling around the configuration table to gracefully disable configuring these resource types.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork jsonapi_extras-3229890
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
bradjones1Comment #4
bradjones1Comment #5
GuyPaddock CreditAttribution: GuyPaddock at Inveniem commentedComment #6
GuyPaddock CreditAttribution: GuyPaddock at Inveniem commented@bbrala: I addressed your comments about static vs. self, but I'm not 100% sure if that accomplishes what @bradjones1 was after. Is it possible that we want this to be static across all the instances regardless of class, to allow multiple sub-classes to share the same cache of resource configs? I'm also not sure what the benefit to doing that is because this issue is supposed to make it possible to decorate the JSON:API Extras version of the resource repository, correct? So, wouldn't there only ever be one instance of this specific type of repository (the rest would not be extending this code)?
Regardless, I fixed the PHP Notice with the
reset()
and rebased on top of 3.x dev so that this is mergeable again. I wasn't sure about the other feedback from bbrala so I'm leaving this as NW for @bradjones1 to comment.Comment #7
bbrala(comment so my avatar shows ;))
Comment #8
bradjones1Re-rolled but now there is a test failure that I would need to recreate locally/look at closer.
Comment #9
bradjones1Comment #11
bbralaThanks for the contribution! :) Sorry for taking so long to finish up this review.
Comment #12
bradjones1