Problem/Motivation

The scope of #2448545: Modernize form select option helpers was getting too large and should likely use an enum anyway so we can add to it if we need to.

Steps to reproduce

Proposed resolution

Convert _none to an enum
Replace all instances

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3548830

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nicxvan created an issue. See original summary.

nicxvan’s picture

Issue summary: View changes
sourav_paul’s picture

Checking...

meeni_dhobale made their first commit to this issue’s fork.

sourav_paul’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work

have not reviewed but has pipeline issues.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

sourav_paul’s picture

Status: Needs work » Needs review

pipeline issues has been fixed.

dcam’s picture

Title: Add enum for _none and replace uses. » Add enum for _none and replace uses
Status: Needs review » Needs work

There is at least one usage that needs to be converted in each of the following files:

  • core/modules/user/src/Plugin/EntityReferenceSelection/UserSelection.php
  • core/modules/responsive_image/src/ResponsiveImageStyleForm.php
  • core/modules/options/options.api.php (since this has example code I think it's important to make sure this is showing a best practice)

There are also usages in tests. I'm not sure whether it's appropriate to replace those or not.