How can I determine which module is associated with a field plugin? I'd like to implement an entity hook, and act on all fields defined by Computed Field FieldType plugins.  So I either need a list of all FieldType plugins provided by the module or need to know which fields are associated with it in order to know which fields to work on (or avoid).  Is this possible?

I'd rather not hard-code the list of plugins (computed_string, computed_decimal, etc.) because new ones could be added later, and then the list would have to change.

And I can't use computed_* because another module, Computed Field Plugin, defines its own field type with that prefix, and I don't want to touch it.

I was expecting something like FieldDefinitionInterface::getDefiningModule(), but that doesn't seem to exist.

For those interested, I'm working on adding support for computed cardinality.
The answer to the question title should be straightforward. You can get the extension from plugins via getProvider(). So you could make a list of all FieldType plugins or get the provider of a specific field type directly from the plugin defintitions:

$module = \Drupal::service('plugin.manager.field.field_type')
  -&gt;getDefinition($field_type)['provider'];


For field definitions this is a bit more complicated. Field storages have this method as well, but for configured fields it always returns the module field. This is not what you want. But there is a different place. When creating field storages the provider of the field type plugin is stored in the property module. So starting from FieldDefinitionInterface you should be able to get the module name:

$module = $field_definition-&gt;getFieldStorageDefinition()-&gt;get('module');