The various field_attach_*() functions were added so that field module wouldn't need to know about specific entity types, this was months before there was anything resembling an entity API as such in core - hook_fieldable_info() was the precursor to hook_entity_info().

However we have an almost-complete entity API now, so we should reverse the pattern and have field module implement entity hooks instead. The field_attach_*() functions could stay for a while especially since some of them are called by more than one hook implementation, but then eventually phased out.

Comments

swentel’s picture

Related, (almost duplicate?) of #1374116: Move bundle CRUD API out of Field API (which now has a patch)

berdir’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)

Yep, duplicate of a bunch of existing issues, most field attach functions are gone.

berdir’s picture