Skip to content

Releases: marc-mabe/php-enum-phpstan

Support for PHPStan 2.0

10 Dec 08:22
9c39239
Compare
Choose a tag to compare

What's Changed

  • PHPStan 2.0 by @olekans in #17
  • Dropped support for php-enum < 4.0

New Contributors

Full Changelog: v2.0.1...v3.0.0

Fixed crash on static calls on variables

02 Apr 13:00
Compare
Choose a tag to compare
  • #13 Fixed crash on static calls on variables like $enum::getValues() thanks to @pascalheidmann

Support for PHPStan 1.0

10 Nov 07:48
0a20a9f
Compare
Choose a tag to compare

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

Added support for PHP-8

08 Nov 10:09
65feecd
Compare
Choose a tag to compare

#7, #8 Added support for PHP-8

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

15 Oct 19:07
29bbc50
Compare
Choose a tag to compare

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

Support return type detection for Enum::getValues()

14 Oct 21:18
Compare
Choose a tag to compare

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

v1.1.0 - Dynamic return type detection of Enum->getValue() & Enum->getValues()

21 Apr 14:44
Compare
Choose a tag to compare

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 - First working release

07 Jan 17:13
Compare
Choose a tag to compare

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

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