Problem/Motivation

Opening an issue for this, as a follow up to the following other issues:

Summary: farmOS strives to make it as easy as possible for module developers to extend it. In order to make it easier for modules to add fields, we use Entity API bundle plugins (#2817751: Create an API for bundle plugins) for asset, log, and plan entities with base/bundle field definitions defined in code (#3183372: Convert config fields to base/bundle fields), and we provide a hook for adding fields to existing bundles (#3188055: Provide a hook for adding bundle fields).

Proposed resolution

Consider whether it is worth it to use bundle plugins for taxonomy terms as well. This is a more invasive change to Drupal core functionality (taxonomy terms), so it may require more testing than our other primary asset types did.

Alternatively, we may decide it's not worth it, and we accept that config fields will be used instead. This poses the same challenges and limitations outlined in #3175497: [META] Allowing optional/contrib modules to add fields to bundles.

Remaining tasks

TBD

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

m.stenta created an issue. See original summary.

m.stenta’s picture

Priority: Normal » Minor

Setting the priority of this to "minor" because it's probably not something we are going to consider before 2.0.0-beta1.

m.stenta’s picture

Status: Active » Closed (won't fix)

I'm going to close this as "won't fix" for now, until we hear there is a real need for it.

m.stenta’s picture

I think this would be a breaking change, because it would require all modules that provide a taxonomy vocabulary via config/install/taxonomy.vocabulary.*.yml to *also* provide a bundle plugin class PHP file. If any module does not provide one (eg a contrib module), it would cause an error (I think).

So this may need to wait for farmOS 4.x, if we do it at all.