Bug report
Bitwise flags are not working together with self::CONST_* - sorry if I missed something in the type docs that helps declare this better. I don't know if it needs a new type to specify ints that are bit masks or what exactly. Might be a feature request rather than bug report.. Psalm seems to output the same error, so maybe I'm the problem, but it doesn't seem to be that unreasonable to list all valid constants that can be passed in, without listing all possible combinations or just typing it as an int. Listing constants helps with auto-completion and self-documentation so it'd be great to be able to.
Code snippet that reproduces the problem
https://phpstan.org/r/ab87e34e-a3c2-4afe-a7cd-f77f8406df27
Expected output
No error
Bug report
Bitwise flags are not working together with self::CONST_* - sorry if I missed something in the type docs that helps declare this better. I don't know if it needs a new type to specify ints that are bit masks or what exactly. Might be a feature request rather than bug report.. Psalm seems to output the same error, so maybe I'm the problem, but it doesn't seem to be that unreasonable to list all valid constants that can be passed in, without listing all possible combinations or just typing it as an int. Listing constants helps with auto-completion and self-documentation so it'd be great to be able to.
Code snippet that reproduces the problem
https://phpstan.org/r/ab87e34e-a3c2-4afe-a7cd-f77f8406df27
Expected output
No error