What title says, needs a custom normalizer class to include the target_type on normalize and correctly denormalize the uuid.

Comments

berdir’s picture

Status: Active » Needs review
StatusFileSize
new2.08 KB

Using this for default content, manual testing worked fine.

Status: Needs review » Needs work

The last submitted patch, 1: dynamic_entity_reference_normalizer-2332117-1.patch, failed testing.

berdir’s picture

Arg, didn't think of this, we obviously don't want a hardcoded services dependency on rest.module, but we do need to pass those along for our parent class.

I guess we need a DynamicEntityReferenceServiceProvider for this, with a module check on rest.module?

/me no likes service-based discovery, this wouldn't be a problem with plugins...

dawehner’s picture

There is a class in symfony called ResolveInvalidReferencesPass though this would not ignore the main class. I could imagine it to be helpful do have something like module_dependencies or even
a compiler pass which removes entries in the case their dependencies doesn't exist.

berdir’s picture

Status: Needs work » Needs review
Issue tags: +Needs tests
StatusFileSize
new3.15 KB

Tested that this didn't blow up, didn't test yet if it actually works ;)

larowlan’s picture

Status: Needs review » Fixed

  • larowlan committed cb2e89c on 8.x-1.x authored by Berdir
    Issue #2332117 by Berdir: Added a DynamicEntityReferenceItemNormalizer.
    

Status: Fixed » Closed (fixed)

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