Skip to content

Conversation

ruudk
Copy link
Collaborator

@ruudk ruudk commented Oct 3, 2025

I would like to propose using a new (and better) error formatter for PHPStan.

Screenshot

Features

  • Every error has it's own clickable file + line link (default formatter shows the file once, and then displays the line + errors)
  • Errors don't wrap, so they take your while terminal (default formatter wraps in a table)
  • Highlighting of variables, fully qualified class names and other common types. This is done naively and there are cases where it does not work.
  • Long file paths are truncated visually (src/App/../Entity/User.php) while keeping the clickable link intact
  • The filename + line is clickable depending on your terminal and their support for clickable links. For example, in PHPStorm's built-in editor, it doesn't work and there we print file:///Volumes/CS/www/src/App/User.php.

See https://github.com/TicketSwap/phpstan-error-formatter

Curious what you think @spawnia @simPod

@ruudk ruudk marked this pull request as ready for review October 3, 2025 12:12
@spawnia spawnia merged commit 2e7b133 into webonyx:master Oct 7, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants