Follow up to #1892320: Add deserialize for JSON/AJAX. Small change, the EntityNormalizer might as well extend the ComplexDataNormalizer, then it can inherit the normalize() method. At the moment it is exactly the same.

Comments

damiankloip’s picture

StatusFileSize
new1.15 KB

Rerolled.

damiankloip’s picture

1: 2181601-1.patch queued for re-testing.

dawehner’s picture

By the name of the class you could assume that this class is not bound to content entities aka. entities with typed data only.
Does depending on ComplexDataNormalizer basically does that though under the hood?

berdir’s picture

It is content entity specific, config entities have no Iterator integration and have no fields.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Ah I see, so can we fix that as part of a follow? There is for example the following code in the file:
protected $supportedInterfaceOrClass = array('Drupal\Core\Entity\EntityInterface');
so this is a lie.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 08c9054 and pushed to 8.x. Thanks!

  • alexpott committed 08c9054 on 8.x
    Issue #2181601 by damiankloip: Drupal\serialization\Normalizer\...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.