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

Created on 16 November 2021, over 2 years ago
Updated 7 December 2023, 7 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 22 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.69.0 2024