-
-
Notifications
You must be signed in to change notification settings - Fork 946
Description
Bug report
When using the baseline error format (to generate a baseline file to include to ignore legacy errors), it appears that < is not getting escaped properly.
Here's an example of one that was put in my baseline file (using PHPStan 0.12.4):
message: "#^Comparison operation \"\<\\=\" between \\*NEVER\\* and 5 is always true\\.$#"
Here's a similar error added, but with > instead of <:
message: "#^Comparison operation \"\\>\\=\" between \\*NEVER\\* and 1 is always true\\.$#"
Notice that > is getting two escaping slashes before it but < only gets one.
This seems to happen whenever < is encountered, not just on this particular message.
When trying to include the baseline file, PHPStan throws an exception:
In Decoder.php line 331:
Invalid escaping sequence < on line 64, column 13.
If I manually add the additional escape slash, the file parses fine.