First discovered at #2631774-26: Impossible to update Comment entity with REST (HTTP PATCH): bundle field not allowed to be updated, but EntityNormalizer::denormalize() requires it. Now while working on #2737719-105: EntityResource: Provide comprehensive test coverage: for every entity type, every format, every method, this was once again a huge WTF.
In #2631774: Impossible to update Comment entity with REST (HTTP PATCH): bundle field not allowed to be updated, but EntityNormalizer::denormalize() requires it, we only cared about two things:
- Making it possible to
PATCHCommententities at all - Solid test coverage for
PATCHingCommententities, and nothing more (i.e. not caring about other edge cases or other HTTP methods)
But now we want to make Drupal 8's REST best-in-class… which requires this weirdness to be fixed, or at the very minimum be thoroughly explained and tested. Not for a specific entity type, but in general, for the HAL normalizer.
Comments
Comment #2
wim leersComment #3
wim leersComment #6
effulgentsia commentedI just now committed #2824851: EntityResource::patch() makes an incorrect assumption about entity keys, hence results in incorrect behavior. With that done, what's left that needs to be done in this issue?
Comment #13
spokjeThe
halmodule has moved out of Drupal Core and into a Contrib Module.Moving this issue to the Contrib Module queue.
Comment #14
larowlanNeed to ascertain if this is still an issue after #6