Open kelunik opened 3 years ago
Hey @kelunik, can you reproduce the issue on https://psalm.dev ?
@weirdan Can you take at look at this one?
https://psalm.dev/r/fb5c5555dc https://psalm.dev/r/fb5c5555dc?php=7.2
I think this could be fixed by conditional execution again. The error reported by psalm is not really relevant because the code only use the function when it's available
I found these snippets:
I think this could be fixed by conditional execution again.
Should be easy, just make the body of this if
unconditional:
https://github.com/amphp/amp/runs/1714053018?check_suite_focus=true#step:9:14
When run on PHP 8.0, an error is reported, because Psalm thinks the return type of
hrtime(false)
isint
instead ofint[]
. But this only happens if thephpVersion
inpsalm.xml
is set below7.3
. Works fine on PHP 7.4.Unrelated to the hrtime issue, I had to somehow add the function files to
<stubs />
when upgrading to Psalm 4.x for some reason.