vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.55k stars 660 forks source link

Class constant doesn't work as an int range boundary #9893

Open fluffycondor opened 1 year ago

fluffycondor commented 1 year ago

https://psalm.dev/r/72a37e2f73

Expected: no errors. Got: InvalidDocblock.

psalm-github-bot[bot] commented 1 year ago

I found these snippets:

https://psalm.dev/r/72a37e2f73 ```php $year */ public function bar(int $year): void {} } ``` ``` Psalm output (using commit 5df772b): ERROR: InvalidDocblock - 7:16 - Invalid type "Foo::YEAR" as int min boundary in docblock for Foo::bar ```
orklah commented 1 year ago

Yeah, that's not yet supported