-
Notifications
You must be signed in to change notification settings - Fork 446
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
Expose Output::isDecorated and Output::isVeryVerbose #3436
Conversation
You've opened the pull request against the latest branch 2.0.x. PHPStan 2.0 is not going to be released for months. If your code is relevant on 1.12.x and you want it to be released sooner, please rebase your pull request and change its target to 1.12.x. |
@ondrejmirtes This might be a breaking change for 1.12. Maybe we can add the method to the SymfonyOutput in 1.12 . And add it to the Output interface in 2.x? Then in my code, I can do a check if |
This can be used by an ErrorFormatter to determine if `--ansi` or `--no-ansi` was used. A use case can be to toggle rendering of colors or hyperlinks. When ansi is not enabled, one might want to render a link differently.
I don't think so. No one has a reason to implement a custom Output. Please add the interface to BcUncoveredInterface (a list of interfaces that users can use but not implement). |
Updated the PR |
Thank you! |
This can be used by an ErrorFormatter to determine if
--ansi
or--no-ansi
was used.A use case can be to toggle rendering of colors or hyperlinks.
When ansi is not enabled, one might want to render a link differently.
Needed for https://github.com/TicketSwap/phpstan-error-formatter