Problem/Motivation

\Drupal\Core\Extension\ExtensionLifecycle is just a bunch of string-backed constants, and a static method to check if an arbitrary string matches one of these constant values. This sounds a lot like an enum.

Steps to reproduce

Proposed resolution

  • Convert the class to an enum
  • Remove ::isValid(), and use ::tryFrom() instead

Remaining tasks

Haven't really thought this through, maybe it's not a good idea. So figure out if it's worthwhile.

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3575885

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

mstrelan created an issue.

nicxvan’s picture

Yes I was thinking the same thing when I was fixing the new admin theme missing experimental status.