You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a PHPUnit test that asserts that an array<string, int> array in an object property matches the expected value. However, if the expected value contains special characters in its string keys, Psalm reports an error saying the array cannot be used in an assertion:
Psalm output (using commit aa7e400):
ERROR: InvalidDocblock - 21:1 - array{#[]: 21, <<>>: 6} cannot be used in an assertion
INFO: MissingParamType - 28:32 - Parameter $actual has no provided type
This is related to #7076 that drastically improved the way assertions for arrays works. This seems related to escaping some chars in the string representation of the array. I'll try to check that.
I have a PHPUnit test that asserts that an
array<string, int>
array in an object property matches the expected value. However, if the expected value contains special characters in its string keys, Psalm reports an error saying the array cannot be used in an assertion:https://psalm.dev/r/d3c81c61d3
This worked fine in Psalm 4.14 and then broke starting in Psalm 4.15.
The text was updated successfully, but these errors were encountered: