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.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle