marc-mabe/php-enum-phpstan
PHPStan extension for marc-mabe/php-enum. Teaches PHPStan about enum accessor methods and allowed values so static analysis understands your enumerations and catches invalid usage. Install with Composer and include the provided extension.neon.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| marc-mabe/php-enum | 0.87 | Native PHP enum implementation via an abstract base class. Extend it to define enumerations from public constants (supports scalars, null, and arrays), create and compare enum instances, and keep a strict set of named values for safer domain modeling. | 497 | 503 | 36 | 4M | 1 | 18.3 | 57.2 | BSD-3-Clause | 8 months ago | |
| timeweb/phpstan-enum | 0.86 | PHPStan extension for PHP enums. Provides additional rules and type inference to catch invalid enum values and comparisons, improve static analysis around backed/unit enums, and surface enum-related bugs early in CI. | 44 | 44 | 7 | 52K | 1 | 5.1 | 42.3 | MIT | 1 year ago | |
| laudis/typed-enum | 0.86 | — | 4 | 4 | 0 | 26K | 0 | 0.0 | 51.1 | MIT | — | |
| henzeb/enumhancer-ide-helper | 0.86 | 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 | 2K | 0 | 0.3 | 45.8 | AGPL-3.0 | 3 years ago | |
| paillechat/php-enum | 0.85 | 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 | 468 | 0 | 2.0 | 20.1 | MIT | 7 years ago | |
| archtechx/enums | 0.85 | 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. | 568 | 567 | 23 | 530K | 2 | 7.1 | 41.3 | MIT | 11 months ago | |
| konekt/enum | 0.85 | 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 | 61K | 0 | 0.0 | 55.3 | MIT | — |
How can I help you explore Laravel packages today?