enums

Installation
SKILL.md

PHP Enums

When to use

  • The user needs a fixed, closed set of named values such as order status, role, or state.
  • The user wants to replace magic strings or class constants with a type-safe enum on PHP 8.1+.
  • The user maps untrusted HTTP or API input to a known enum set and must reject invalid values.

When NOT to use

  • Do not use this skill when the value set is open-ended or third parties must add values at runtime.
  • Do not use enums when the target runtime is PHP 7.4 or 8.0; use class constants with allow-list validation instead.

Core guidance

Installs
1
GitHub Stars
3
First Seen
Jul 3, 2026
enums — anyorgname/php-skills