With #1969728: Implement Field API "field types" as TypedData Plugins and all the entity work in d8 field API attachers are obsolete: We do not provide a public API for working with some configurable field on an entity only, we only provide an API to work with the whole entity and fields.

E.g. you won't call field_attach_view() - instead you do use the entity render controller to view the whole entity. So let's make that explicit: You should not use field API attachers any more.

Right now, entity controllers partly still use field API attachers internally do their job, but that's subject to refactoring anyway such that all entity fields are handled the same. When we've done that, we can remove those deprecated functions later on.

CommentFileSizeAuthor
#1 d8_field_deprecate.patch6.61 KBfago
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fago’s picture

Priority: Normal » Major
Status: Active » Needs review
FileSize
6.61 KB

Patch attached.

Note that this leaves out field_attach_preprocess() and hook_field_attach_purge() for now as we have no entity equivalents there yet. Opened #2023571: Support preprocessing in EntityViewBuilder for the former, the later is hopefully dealt with over at #1497374: Switch from Field-based storage to Entity-based storage.

catch’s picture

Status: Needs review » Reviewed & tested by the community
fago’s picture

Title: Mark field_attach_* functions deprecated » Mark field_attach_* functions as deprecated
Status: Reviewed & tested by the community » Needs review

grammar fix

catch’s picture

Status: Needs review » Reviewed & tested by the community

;)

fago’s picture

Don't meant to change status ;-)

yched’s picture

+1

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

Status: Fixed » Closed (fixed)

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