Allow shared bundle classes for group relationships using the same plugin

Created on 23 August 2023, over 1 year ago
Updated 25 August 2023, about 1 year ago

Spin-off of 📌 Deprecate the membership loader in favor of shared bundle classes Fixed for merely adding the concept of shared bundle classes.

Right now, Group creates a GroupRelationship bundle every time you install a plugin on a GroupType. This means that, if you were to use regular bundle classes, you'd end up with several classes representing the concept of a group membership, a grouped article or what have you. To improve DX, we want to introduce a concept where one class can be shared among all bundles for a given plugin.

The system will be compatible with regular bundle classes, not interfering with them if they exist. The logic is as follows:

  • No shared bundle class, no bundle class: Entity is instance of GroupRelationship
  • No shared bundle class, bundle class: Entity is instance of the bundle class
  • Shared bundle class, no bundle class: Entity is instance of the shared bundle class
  • Shared bundle class, bundle class: Entity is instance of the bundle class

To make it so people can easily create a regular bundle class, you should put all of your shared bundle class functionality in an interface and trait. Then the individual bundle class is not required to extend your shared bundle class, but can easily opt in to your interface by using the trait.

📌 Task
Status

Fixed

Version

2.1

Component

Code

Created by

🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024