We're currently introducing PHPStan's bleeding edge and I see that it started reporting errors like @readonly property cannot have a default value on classes that extend MyCLabs\Enum\Enum. It looks like @psalm-immutable annotation is normalised by PHPStan into readonly state, so cache and instances properties are considered as impure.
Is it possible to improve Enum's phpDocs so PHPStan won't report this errors?
Thanks @mabar for pointing it out on Slack 🍻
We're currently introducing PHPStan's bleeding edge and I see that it started reporting errors like
@readonly property cannot have a default valueon classes that extendMyCLabs\Enum\Enum. It looks like@psalm-immutableannotation is normalised by PHPStan intoreadonlystate, socacheandinstancesproperties are considered as impure.Is it possible to improve
Enum's phpDocs so PHPStan won't report this errors?Thanks @mabar for pointing it out on Slack 🍻