-
Notifications
You must be signed in to change notification settings - Fork 650
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
Multiple variables in @psalm-trace #6920
Conversation
I found these snippets: https://psalm.dev/r/31262a113f<?php
$a = 123;
$b = 456;
/** @psalm-trace $a $b */
$c = 123;
$d = 456;
/** @psalm-trace $c */
/** @psalm-trace $d */
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I think that's unlikely.
Not with |
Thanks! |
For checking for multiple errors, see also #6899 where I had to do that last week |
Psalm did allow multiple variables in
@psalm-trace
but failed to add multiple trace issues to the same place.That way, both cases in this example fail:
https://psalm.dev/r/31262a113f
Additional to fixing this bug, I’ve added the ability to use a comma as separator, so this line is valid also:
This is probably more natural for some people.
Caveat:
$emitted_key
for that case breaks something elsewhere. But no included test fails (at least none related to my changes) and using this codebase in another project worked as expected.