Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Enum Phpstan Laravel Package

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.

View on GitHub
Deep Wiki
Context7
v3.0.0

What's Changed

New Contributors

Full Changelog: https://github.com/marc-mabe/php-enum-phpstan/compare/v2.0.1...v3.0.0

v2.0.1
  • #13 Fixed crash on static calls on variables like $enum::getValues() thanks to @pascalheidmann
v2.0.0

#9, #11, #12 Added support for PHPStan 1.0 and dropped support for earlier releases thanks @ondrejmirtes

v1.3.0

#7, #8 Added support for PHP-8

v1.2.1

#4 #5 fixed return type detection of [self|static]::getValues()

v1.2.0

Detect possible return types of static call Enum::getValues()

v1.1.0

Added dynamic return type detection for Enum->getValue() & Enum->getValues().

  • detect return type of getValue()/getValues() of an enumeration by defined enumerators
    • If possible it also detects constant return values
  • support union of multiple enumerations
    • like the values of a union of IntEnum|StrEnum will be a union of int|string
v1.0.0

Support detection of Enum::CONST() accessor methods including:

  • return type declaration
  • deprecation detection from @deprecated annotation of constant
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport