Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supression is not working in echo shorthand #11017

Open
mathe42 opened this issue Jun 18, 2024 · 1 comment
Open

Supression is not working in echo shorthand #11017

mathe42 opened this issue Jun 18, 2024 · 1 comment

Comments

@mathe42
Copy link
Contributor

mathe42 commented Jun 18, 2024

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 #10987 but that was not target-oriented. For me this is a Bug but one could argue that this is a Feature Request.

Copy link

I found these snippets:

https://psalm.dev/r/910d5b0fc1
<?php?>
<?=/** @psalm-suppress UndefinedGlobalVariable */$a?>
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant