Bruce Weirdan

Results 291 comments of Bruce Weirdan

And what is the code that produces values of that type? Is it some kind of serialization library?

Generally PHP-Parser parses idealized PHP and doesn't get into version-dependent details. This is its both strong and weak point. To make sure you have a syntactically valid PHP I'd recommend...

Psalm shouldn't report the `ResevedWord` here though

> Would have been cool to be able to change the config attributes in the paslm.dev playground :) You can change _some_ of them by clicking the `Settings` button.

> I would check if it's reporting as possibly undefined for line 62 or not and see from there. It's not. It's been discussed in more details here: https://github.com/vimeo/psalm/issues/10578#issuecomment-1948036529

Most likely it is, but I've no problem to keep both open until we figure out this for sure

Note to future me: `callable(T):void` should be valid in this context, but `callable():T` shouldn't.

while the original bug remains (we infer `$a` to be `int` inside the loop) the snippet no longer emits any issues (I wonder why).

It's been 2 years, so there were quite a bit of changes. Looks like it affects internal functions only though: https://psalm.dev/r/e7de0789c5

No, it's not special. Its parameter type is just overridden in the stub: https://github.com/vimeo/psalm/blob/6b27a6d34bcb96296770b0b31508995de96b48a5/stubs/CoreGenericFunctions.phpstub#L1801-L1805