Problem/Motivation

We want to have a reliable unified way to represent relationships. That way we can normalize a relationship, generate links and use polymorphism to alter any specific bahavior.

Proposed resolution

#2751985: [FEATURE] Add a bundle level relationship to entity level resources introduces the RelationshipInterface class. We can refactor the EntityReference based relationships to use the relationship class.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

e0ipso created an issue. See original summary.

e0ipso’s picture

e0ipso’s picture

Assigned: Unassigned » e0ipso
e0ipso’s picture

We can merge this whenever we get a resolution on #2751985: [FEATURE] Add a bundle level relationship to entity level resources if the tests come back green.

e0ipso’s picture

After it was decided in #2751985: [FEATURE] Add a bundle level relationship to entity level resources that we would drop support for the entity-level resources, I will refactor this patch to not include that code.

e0ipso’s picture

dawehner’s picture

This patch looks really great! Freedom for relationships!
Here is an interface which addresses some points. IMHO Its semantically wrong to let ConfigEntityNormalizer extend ContentEntityNormalizer, but this is of course easy to change.

While going through the files I fixed a bunch of unused use statements.

Status: Needs review » Needs work

The last submitted patch, 7: 2755025--refactor-relationship--7.patch, failed testing.

The last submitted patch, 7: 2755025--refactor-relationship--7.patch, failed testing.

The last submitted patch, 7: 2755025--refactor-relationship--7.patch, failed testing.

The last submitted patch, 7: 2755025--refactor-relationship--7.patch, failed testing.

e0ipso’s picture

Status: Needs work » Needs review
e0ipso’s picture

Status: Needs review » Fixed

Merging b/c green.

  • e0ipso committed a1515c2 on 8.x-1.x
    Issue #2755025 by e0ipso, dawehner: [CLEANUP] Refactor relationships to...
dawehner’s picture

Oh I'm sorry for my stupidity!

e0ipso’s picture

my stupidity

… right …

xD

Status: Fixed » Closed (fixed)

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