Vincent Langlet

Results 395 comments of Vincent Langlet

I'm sad the strategy change wasn't more discussed. When a method is `doThings(Foo $foo): Foo` nobody is shocked if we pass SuperFoo or if the method returns SuperFoo. So with...

> The example given in the psalm doc or release notes (I don't remember which one it is) shows an issue with the unsealed shapes (or the partially unsealed ones):...

> > for people which uses both tools > > It is not just for people that use both tools. It is for phpstan users relying on a dependency where...

> The Psalm syntax > ``` > array{key: string}&array > ``` > which wasn't supported by PHPStan could be changed to > ``` > array{key: string, ...} > ``` For...

> in case it makes sense, then I will try to do it :D Sure it make sense ; but I dunno if we'll be able to drop the dependency...

Hi @orklah @weirdan, I assume this could be an easy fix but I have no idea where such type resolution is done in the psalm codebase. Any idea which method...

Thanks, the PR is done https://github.com/vimeo/psalm/pull/10930 (I also will need your help for https://github.com/vimeo/psalm/pull/10927#issuecomment-2083300456)

> This is hard. Basically any integer operation can overflow into floats but it would be too annoying to report everything like that. Do you have any guideline of when...

Since `A|(B|C)` would be now a possible type, does it require a test to check that a benevolent union `(A|(B|C)|D)` is simplified to `(A|B|C|D)` ?

> What's a typical situation that this PR improves/fixes? https://phpstan.org/r/9be20c04-429f-4dc0-b245-9d23628ae2db Both `$key` and `$bool` are accepted by the method, but the union of both type is not accepted. The current...