Rename field modules to [type]_field

Created on 22 July 2012, over 12 years ago
Updated 12 March 2025, 2 days ago

Problem

  • Some field modules provide functionality that is unrelated to the field functionality.
  • Other modules may depend on the non-field functionality, but need to add the full stack of entity and field modules.

Goal

  • Untangle non-field functionality from field functionality.

Proposed solution (short-term)

  1. Move all field functionality into a new, separate [type]_field.module.

    E.g., so there is a file.module and a file_field.module.

  2. Only change the module name; type/widget/formatter definitions don't need to be renamed β€” the additional "field" suffix would be superfluous within the Field API context.
  3. Consider to move all field modules into a single folder; e.g.:
    core/modules/fields/file_field
    core/modules/fields/image_field
    core/modules/fields/number_field
    core/modules/fields/options_field
    core/modules/fields/text_field
    

    - or alternatively - use a "field_" prefix instead of suffix and use no grouping folder at all; e.g.:

    core/modules/field
    core/modules/field_ui
    core/modules/field_file
    core/modules/field_image
    core/modules/field_number
    core/modules/field_options
    core/modules/field_text
    

Proposed solution (long-term)

  1. Convert all built-in fields in core into field plugins, provided by Field module itself.
    core/modules/field/lib/Drupal/field/Plugin/FieldType/File
    core/modules/field/lib/Drupal/field/Plugin/FieldType/Image
    core/modules/field/lib/Drupal/field/Plugin/FieldType/Number
    core/modules/field/lib/Drupal/field/Plugin/FieldType/Options
    core/modules/field/lib/Drupal/field/Plugin/FieldType/Text
    

Related issues

  • [#]
  • [#]
  • [#]
  • [#]
✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

field system

Created by

πŸ‡©πŸ‡ͺGermany sun Karlsruhe

Live updates comments and jobs are added and updated live.
  • API change

    Changes an existing API or subsystem. Not backportable to earlier major versions, unless absolutely required to fix a critical bug.

  • API clean-up

    Refactors an existing API or subsystem for consistency, performance, modularization, flexibility, third-party integration, etc. May imply an API change. Frequently used during the Code Slush phase of the release cycle.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for sharing your idea for improving Drupal.

    We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024