oskarstark/enum-helper
Helpers for PHP 8.1+ enums: compare enum cases (equals, notEquals, equalsOneOf) and convert enums to arrays (backed and non-backed). Includes an abstract EnumTestCase to simplify testing enum behavior.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| myclabs/php-enum | 0.77 | myclabs/php-enum brings SplEnum-style enums to PHP. Define enum classes, get autogenerated static constructors, validate values, compare instances, list possible values, and use enums as parameter/return types with extra methods—without a PHP extension. | 2,726 | 2,760 | 128 | 3M | 12 | 30.2 | 45.6 | MIT | 1 year ago | |
| konekt/enum | 0.75 | Lightweight PHP enum base class (pre-PHP 8.1) for defining value-safe constants via abstract Enum subclasses. Simple instantiation, validation and utilities, with docs and optional Laravel Eloquent integration via konekt/enum-eloquent. | 21 | 21 | 2 | 74K | 0 | 0.2 | 48.7 | MIT | — | |
| open-southeners/extended-php | 0.74 | Extended PHP helpers for modern apps: adds convenient functions, utilities, and small enhancements that complement core PHP to reduce boilerplate and speed up everyday development. Lightweight, easy to drop into existing projects. | 0 | 0 | 0 | 750 | 0 | 12.2 | 41.5 | MIT | 9 months ago | |
| laudis/typed-enum | 0.74 | — | 4 | 4 | 0 | 32K | 0 | 0.0 | 52.5 | MIT | — | |
| prinsfrank/enums | 0.73 | — | 2 | 2 | 1 | 53K | 0 | 1.8 | 55.3 | MIT | 1 year ago | |
| paillechat/php-enum | 0.73 | PHP 7+ enum library: define enums by extending Enum and declaring constants, then instantiate via static named calls (IssueType::ONE()). Instances are strict-equal singletons, work with in_array/type hints, and can convert to/from names. | 16 | 17 | 3 | 508 | 0 | 2.0 | 20.6 | MIT | 7 years ago | |
| daverandom/enum | 0.73 | Lightweight PHP enum base class: extend a single abstract class and define members as constants. Includes static helpers to validate and resolve enum names and values. Useful for simple, shared enum functionality. | 0 | 0 | 0 | 23 | 0 | 0.3 | 6.6 | MIT | 8 years ago | |
| archtechx/enums | 0.73 | Modern PHP enum helpers: casting, validation, labels, and convenience methods for native enums. Add common patterns like options arrays, random values, and comparisons to make enums easier to use across Laravel apps and APIs. | 566 | 568 | 23 | 597K | 2 | 7.0 | 42.0 | MIT | 1 year ago | |
| henzeb/enumhancer | 0.72 | — | 69 | 70 | 8 | 20K | 0 | 18.4 | 36.6 | AGPL-3.0 | 7 months ago | |
| henzeb/enumhancer-ide-helper | 0.72 | Laravel IDE helper for enhanced PHP enums. Improves autocompletion and type hints for Enumhancer features in PhpStorm and similar IDEs, generating stubs/metadata so enum methods, cases, and helpers are easier to discover and use. | 0 | 0 | 0 | 1K | 0 | 0.3 | 42.9 | AGPL-3.0 | 3 years ago | |
| spatie/enum | 0.71 | Obsolete: PHP 8.1+ has native enums (recommended). Spatie Enum provides strongly typed, object-based enums for older PHP versions, enabling IDE-friendly static analysis and refactoring. Define enums via @method annotations and call StatusEnum::draft(). | 851 | 853 | 67 | 1M | 0 | 15.4 | 43.7 | MIT | 4 years ago | |
| elao/enum | 0.71 | Opinionated extensions for PHP 8.1+ native enums with readable labels, flag/bitmask enums, and extra values. Includes integrations for Symfony (Forms, HTTP Kernel arg resolver, Translation, VarDumper), Doctrine ORM/ODM, and Faker. | 327 | 327 | 29 | 33K | 15 | 30.5 | 36.7 | MIT | 3 months ago |
How can I help you explore Laravel packages today?