[META] Promote field definitions methods to a primary API

Created on 2 June 2014, about 11 years ago
Updated 11 July 2025, about 1 month ago

Problem

Right now, a field definition provides a way to get a default value, some constraints and possibly some allowed values if they are part of the settings. However, even though no field object or field values are needed to make use of that information, the primary API to retrieve default values, constraints or allowed values lives on the field or field item objects.

Solution

Make field definition methods the primary API for getting default values, allowed values and constraints, while allowing field types to customize those.

Issues:
#2238085: [regression] options_allowed_values() signature doesn't allow for Views filter configuration β†’
#2226267: Improve default value handling of fields to be consistent β†’
#2116341: Apply defaults to definition objects β†’ (deals with constraint defaults)
πŸ“Œ Avoid dynamically defining constraints Postponed: needs info (removes TypedData::getConstraints())

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

field system

Created by

πŸ‡¦πŸ‡ΉAustria fago Vienna

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

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

    All the related issues appear to be closed

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. 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!

  • πŸ‡¦πŸ‡ΉAustria fago Vienna

    almost, πŸ“Œ Avoid dynamically defining constraints Postponed: needs info is the only still be left todo. That said, I don't think we need this META anymore, the remaining single todo can stay open. Let's close it.

Production build 0.71.5 2024