chadsikorra/php-simple-enum
A lightweight, dependency-free enum implementation for PHP. Define constant sets with helper methods for validation, value lookup, and comparison, useful where native enums aren't available. Simple API that's easy to drop into existing projects.
chadsikorra/php-simple-enum is a lightweight PHP package that brings clean, type-safe enum support to projects that can't rely on native PHP enums. Define your allowed values once as class constants, then validate and compare against them without scattered magic strings or repetitive conditional checks.
It stays deliberately minimal: no dependencies, no configuration, and no ceremony. Just extend the base class, declare your constants, and get straightforward helpers for checking and enumerating valid values—ideal for older codebases or anywhere a full enum implementation would be overkill.
How can I help you explore Laravel packages today?