-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Description
Feature request
I am in the process of converting existing code to use enums in Monolog, and I noticed that PHPStan wasn't being as helpful as it could be.
See https://phpstan.org/r/920189df-c1f3-4b59-a816-02b8369fb16f for some expected errors which are missing.
See also https://3v4l.org/I2MUn#v8.1.5 for actual output.
The TL;DR is that when you have code like if ($foo < $bar) and then you convert it to enums and suddenly $foo and $bar are enum cases instead of int values, your code breaks but PHPStan does not tell you that this will now always return false.
Metadata
Metadata
Assignees
Labels
No labels