Matthew Brown

Results 64 comments of Matthew Brown

Hmm — it wouldn't really be _fixed_ for the Psalm users who rely on that `never` template comparison behaviour

You're calling a method on `null`, not performing a property fetch on `null`.

Oh, just the inconsistency that `Array_` on the LHS of an assignment may have items that are `null` (like `List_`), but an `Array_` on the RHS of an assignment is...

@TomasVotruba ```php [$a, $b,,, $c] = [1, 2, 3, 4, 5]; ```

Makes sense – I'm about 12 months late with this

@Gert-dev @nikic I'm working on incremental parsing for Psalm. Current activity is in https://github.com/vimeo/psalm/tree/server-temp-changes but it'll likely get merged into master soon. For dealing with a change in a method...

@Gert-dev here's the (more mature) file that's used today: https://github.com/vimeo/psalm/blob/03ea94e087a10a69def73a1b6e38121bfe0f301f/src/Psalm/Visitor/PartialParserVisitor.php

You'll want to use `` or `` as appropriate given the nesting of those files in your file system.

But really the plugin should be able to interpret the rules in a given class.

This is all on me, but I pushed for this to be clarified in Psalm 5. Both [Phan](https://phan.github.io/demo/?code=%3C%3Fphp%0A%0A%2F**%0A+*+%40param+array%7Bid%3A+string%2C+name%3A+string%7D+%24user%0A+*+%40return+array%7Bid%3A+string%2C+name%3A+string%7D%0A+*%2F%0Afunction+takesUserData%28array+%24user%29%3A+array+%7B%0A++%24user%5B%27extra_data%27%5D+%3D+new+stdClass%28%29%3B%0A++return+%24user%3B%0A%7D%0A%0A%24foo+%3D+%5B%27id%27+%3D%3E+%27DP42%27%2C+%27name%27+%3D%3E+%27Douglas+Adams%27%5D%3B%0Aecho+implode%28%27%27%2C+takesUserData%28%24foo%29%29%3B) and [PHPStan](https://phpstan.org/r/4a61d13c-74f0-46d3-9bad-f3a61dd1d172) have unsound behaviour. In both cases you were following Psalm’s...