Problem/Motivation
Quoting Wim Leers at #2543726-247: Make $term->parent behave like any other entity reference field, to fix REST and Migrate support and de-customize its Views integration:
I followed the steps in #246 (albeit without using
drush). I reproduced it.The root cause is not Commerce, nor this patch. It's the
entity_reference_revisionsmodule's\Drupal\entity_reference_revisions\EntityReferenceRevisionsServiceProvider. That will need to be updated.
(And if that code used the service decorator pattern, it wouldn't even need to be updated. Look at thehtml_response.attachments_processor.big_pipeservice for an example of that.)
That was wrong, see #3, but using the parent: … pattern is possible. It still achieves the same: removing the need to keep this subclass' service's arguments in sync with the parent's.
Proposed resolution
Use parent: … pattern, then you won't have to update this again in the future.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2931496-5.patch | 1.58 KB | wim leers |
Comments
Comment #2
wim leersOh and I noticed that it's a HAL-only normalizer. What about the "default" normalization provided by the
serializationmodule, for thejsonandxmlformats? You simply don't support those!Comment #3
berdirAs discussed in that issue, decorator doesn't work and anyone is welcome to provide patches to support the other formats, it simply wasn't something we needed so far.
Comment #4
idebr commentedClosed #2845961: JSON Serializer / Views REST export as a duplicate.
Comment #5
wim leers(Going through ancient browser tabs. Sorry for the very slow reply!)
You're right, using
decorates: …is not possible, but usingparent: …is.Comment #6
miro_dietikerHow is this different to the previous #2848878: Embed Paragraph Content in Normalized Parent Entities (REST)