-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Render error identifier when ran verbose #15
Render error identifier when ran verbose #15
Conversation
Thanks @SanderMuller , I've wanted this for a long time 👏 I've just approve the CI... could you check it? |
Thanks! I fixed PHPStan. Seems my test broke it. Shame the base |
The 6th error in the base class actually has an identifier, so used that one now @TomasVotruba |
I'm curious... does PHPStan native error formatter display identifier also only with |
Re-approved, these is new CI feedback 👍 |
Yes |
Tests were passing on Windows, will fix it from my Mac in a bit. 😅 |
@SanderMuller Don't worry about testing this, it's pretty straighforward :) I've run classic PHPStan and it displays the identifier out of the box, even without |
I guess PHPStan 2.0 added this by default instead of opt-in. I think identifiers became mandatory in v2 and therefor making sense that it's rendered by default. |
Awesome, let's ship this 🙏 |
Thank you 👍 |
Just tagged... give it a try: https://github.com/symplify/phpstan-extensions/releases/tag/12.0.1 |
Yay, it works how I want it to work! Thanks for the quick review, merge & tag! |
PHPStan when ran verbose (-v) displays the error identifier. This is very useful when solving errors or choosing to ignore this type of error, either globally or locally
Global ignore example
In
phpstan.neon
Local ignore example
Currently Simplify does not support rendering the error identifier, which is what keeps me from fully using it. This PR adds support for rendering the error identifier.
Example output:
vendor/bin/phpstan analyse --error-format symplify -v
vendor/bin/phpstan analyse --error-format symplify
(without the-v
verbose flag) has no changes.For reference, the PHPStan error formatter output with the
-v
verbose flag:vendor/bin/phpstan analyse -v