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 want to suggest to color or format the expected and actual value of rule errors, since these are usually the most important part of an error message. additionaly these are often-times only separated by a single , so e.g. on big array shapes its pretty hard to see where the actual value ended and where the expected value begins
something like
The text was updated successfully, but these errors were encountered:
I understand you're proposing to make PHPStan's error messages more human-readable and easier to understand. You're right; if we can achieve this as a formatter, it would indeed be very helpful.
Currently, our formatter is outputting PHPStan's error messages as-is. These messages lack consistency in their format, which could make parsing them challenging. However, I think it's worth exploring this idea further.
Thank you for following up and sharing that discussion link. I wasn't aware of this ongoing conversation about improving error formatters in PHPStan.
The approach discussed in phpstan/phpstan#11581 indeed looks promising. It would be a significant enhancement if such functionality were integrated directly into PHPStan. This kind of improvement could greatly benefit all error formatters, including ours.
While i want to avoid simply copying their ideas, I'll review the thread carefully and see how i might incorporate similar concepts in a way that's appropriate for friendly formatter.
Thank you again for bringing this to our attention.
thank you for this nice formatter.
I want to suggest to color or format the expected and actual value of rule errors, since these are usually the most important part of an error message. additionaly these are often-times only separated by a single
,
so e.g. on big array shapes its pretty hard to see where the actual value ended and where the expected value beginssomething like
The text was updated successfully, but these errors were encountered: