Add support for PHP 8.1 Enums as allowed values for list_* field types

Created on 16 November 2021, almost 3 years ago
Updated 7 December 2023, 11 months ago

Problem/Motivation

PHP 8.1 comes with support for Enums
It makes sense to be able to use them for allowed values for list_* field types

Proposed resolution

Support using an Enum for allowed values

Enhance list_ field items with a allowed_values_enum setting. Available options will be extracted from that enum automatically.

Remaining tasks

  • Update documentation. Figure out how to best document that
  • Introduce change record for this change?.

User interface changes

API changes

Data model changes

Release notes snippet

Feature request
Status

Needs work

Version

10.1

Component
Typed data 

Last updated 21 days ago

  • Maintained by
  • 🇦🇹Austria @fago
Created by

🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

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.

Production build 0.71.5 2024