vimeo / psalm

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

Supression is not working in echo shorthand #11017

Open mathe42 opened 2 weeks ago

mathe42 commented 2 weeks ago

Supression is not working in echo shorthand. Simple example:

https://psalm.dev/r/910d5b0fc1

This is a simple example in my use case I can't use in my config as they are only file level.

I tried using a discussion https://github.com/vimeo/psalm/discussions/10987 but that was not target-oriented. For me this is a Bug but one could argue that this is a Feature Request.

psalm-github-bot[bot] commented 2 weeks ago

I found these snippets:

https://psalm.dev/r/910d5b0fc1 ```php ``` ``` Psalm output (using commit 16b24bd): ERROR: UndefinedGlobalVariable - 2:50 - Cannot find referenced variable $a in global scope INFO: MixedArgument - 2:50 - Argument 1 of echo cannot be mixed, expecting string ```