timeweb/phpstan-enum
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.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| prinsfrank/enums | 0.88 | — | 2 | 2 | 1 | 58K | 0 | 1.8 | 55.3 | MIT | 1 year ago | |
| henzeb/enumhancer-ide-helper | 0.87 | 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 | |
| adrenalinkin/enum-mapper | 0.86 | — | 1 | 1 | 0 | 0 | 0 | 0.0 | — | MIT | — | |
| spatie/laravel-enum | 0.84 | Laravel integration for spatie/enum: use Enum base class in Laravel, cast model attributes to enums (including nullable and arrays), and get Laravel-friendly behavior via custom casts and Castable support for Eloquent. | 365 | 369 | 36 | 151K | 0 | 11.3 | 35.8 | MIT | 1 year ago | |
| laudis/typed-enum | 0.84 | — | 4 | 4 | 0 | 33K | 0 | 0.0 | 52.8 | MIT | — | |
| paillechat/php-enum | 0.84 | 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 | 527 | 0 | 2.0 | 20.8 | MIT | 8 years ago | |
| elao/enum | 0.84 | 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 | 5 months ago | |
| shipmonk/phpstan-rules | 0.84 | 40 super-strict PHPStan rules from ShipMonk to plug gaps in extra-strict setups. Install via Composer, include rules.neon, then enable/disable or tune rules per-project. Targets tricky PHP edge cases like unsafe comparisons, casts, arrays, enums and more. | 155 | 157 | 23 | 406K | 1 | 26.1 | 54.5 | MIT | 4 months ago | |
| simplesamlphp/assert | 0.84 | Fork of webmozart/assert that lets every assertion throw your chosen exception (or a default AssertionFailedException) instead of always InvalidArgumentException. Adds a few custom assertions aimed at XML/SAML2 use cases. | 7 | 7 | 3 | 224K | 0 | 18.6 | 64.0 | LGPL-2.1 | 2 months ago | |
| art-fatal/doctrine-enum-bundle | 0.83 | — | 0 | 0 | — | 0 | — | 0.0 | — | — | — | |
| aboutcoders/enum-serializer-bundle | 0.83 | Symfony bundle adding JMS Serializer support for myclabs/php-enum enums. Register enum types via config or tagged services, then serialize/deserialize to JSON using enum class names in @Type annotations or directly in serializer calls. | 3 | 4 | 5 | 348 | 1 | 0.6 | 26.8 | MIT | 5 years ago | |
| adrenalinkin/enum-property-bundle | 0.83 | Symfony bundle integrating EnumMapper: adds Twig filters/functions to convert enum DB values to human labels and back, fetch full enum maps, and provides validation support for enum properties. Install via Composer and enable the bundle in AppKernel. | 0 | 0 | 0 | 0 | 0 | 0.0 | — | MIT | — | |
| archtechx/enums | 0.82 | 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 | 568 | 23 | 597K | 2 | 7.0 | 42.0 | MIT | 1 year ago | |
| henzeb/enumhancer | 0.82 | — | 69 | 70 | 8 | 22K | 0 | 16.9 | 36.8 | AGPL-3.0 | 8 months ago | |
| marc-mabe/php-enum-phpstan | 0.82 | 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. | 12 | 12 | 6 | 8K | 0 | 2.6 | 38.3 | BSD-3-Clause | 1 year ago | |
| phpstan/phpstan-phpunit | 0.76 | PHPStan extension for PHPUnit: improves type inference for mocks (intersection types for createMock/getMock), understands Foo|MockObject phpDocs, adds early-terminating methods to avoid undefined vars, and refines assert() types. Optional strict rules catch improper assertion usage. | 541 | 539 | 57 | 4M | 37 | 43.3 | 79.1 | MIT | 2 months ago |
How can I help you explore Laravel packages today?