ticketswap/phpstan-error-formatter
A minimalistic PHPStan error formatter that makes each error a clickable file and line link, avoids wrapping so errors use your full terminal width, highlights variables and class names, and visually truncates long file paths.
errorFormat: ticketswap, editorUrl), MIT-licensed, removable in a single revert. Low-cost, low-regret decision — the kind that can be made by a tech lead without a PM sign-off.Adopt when:
editorUrl. Where links aren't supported, the fallback is a printed file:///... path, not a broken build.Look elsewhere when:
--error-format=json/github/gitlab/teamcity formatters are the right tool; this is a human formatter and should not be wired into anything that parses text.Executives (one paragraph): "We're proposing a zero-cost developer-productivity change: a small MIT-licensed open-source add-on that reformats PHPStan's static-analysis output so every error is a clickable file-and-line link with syntax highlighting. It's a dev-only dependency with a one-line install and a one-line revert, no licensing cost, no runtime or customer impact, and no effect on what our analyzer flags. The expected return is faster triage of static-analysis failures and less onboarding friction for engineers new to our quality gates. Because it's cheap and reversible, we recommend a two-week trial on one team with a simple before/after measure of time-to-fix rather than a formal business case."
Engineering: "It's presentation only. composer require --dev ticketswap/phpstan-error-formatter, then errorFormat: ticketswap; with phpstan/extension-installer nothing else is needed, otherwise include extension.neon. Set editorUrl (phpstorm://open?file=%%file%%&line=%%line%% or vscode://file/%%file%%:%%line%%) — the formatter depends on it for clickable links. Works with Larastan and PHPStan 2.x; CI covers PHP 8.1–8.5. It's active but small — pin the version, don't build automation on its text output, and assume we may remove it later at no cost. Do not use it where CI needs structured errors; keep the JSON formatter there."
Ask: a timeboxed trial on one team or repo, success criteria = reduced time from phpstan analyse failure to opened file for a sample of real errors, plus no CI regressions. Revert cost is one commit, so the downside is bounded regardless of outcome.
How can I help you explore Laravel packages today?