Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Phpstan Error Formatter

Phpstan Error Formatter Laravel Package

ticketswap/phpstan-error-formatter

Minimalistic PHPStan error formatter with clickable file+line links per error, no wrapping output, naive syntax highlighting, and visually truncated paths while preserving links. Easy install via Composer; enable with errorFormat: ticketswap.

View on GitHub
Deep Wiki
Context7

A minimalistic error formatter for PHPStan

Frequently asked questions about Phpstan Error Formatter
How do I integrate this formatter into my Laravel project’s PHPStan setup?
Run `composer require --dev ticketswap/phpstan-error-formatter` and add `parameters: errorFormat: ticketswap` to your `phpstan.neon`. If using `phpstan/extension-installer`, no extra steps are needed—it auto-loads the extension.
Will this work with Laravel’s Artisan commands or CI/CD pipelines?
Yes, it’s designed for CLI output. For CI, ensure your terminal/IDE supports clickable links (e.g., GitHub Actions with VS Code). If not, it falls back to readable plaintext with `file://` URLs for IDEs like PhpStorm.
Does this formatter support PHPStan 1.x, 2.x, or 3.0 for Laravel projects?
It officially supports PHPStan 1.x and 2.x. PHPStan 3.0 compatibility is untested—check GitHub issues for updates. Laravel projects typically use 1.x/2.x, so this is unlikely to be a concern.
Can I customize the IDE/editor URL scheme (e.g., for PhpStorm or VS Code)?
Absolutely. Add `editorUrl: 'vscode://file/%%file%%:%%line%%'` or `phpstorm://` to your `phpstan.neon` under `parameters`. This overrides the default clickable link behavior.
Will this break existing PHPStan rules or slow down analysis in Laravel?
No, it’s a presentation layer only—no core logic changes. Benchmarks show <50ms overhead for highlighting. Laravel’s static analysis workflows (e.g., `phpstan:parallel`) remain unaffected.
How does it handle long file paths in Laravel’s nested `app/` or `src/` directories?
Paths are visually truncated (e.g., `src/App/../Entity/User.php`) but retain full clickable links. For example, `vendor/ticketswap/...` becomes `[vendor/...]` while keeping the original path intact.
Is there a fallback if this formatter fails to load in production?
Yes, PHPStan gracefully degrades to its default formatter. No runtime errors occur—just standard output. Ideal for CI or environments where extensions might be disabled.
Does this work with Laravel Pint or other code-quality tools?
Yes, it’s independent of Pint. Use it alongside Pint or Telescope for consistent error formatting. The formatter focuses on PHPStan output, so it won’t interfere with other tools.
Can I use this with custom PHPStan rules or Laravel-specific extensions?
Absolutely. The formatter is rule-agnostic—it processes all PHPStan errors uniformly. Test with your custom rules to ensure no conflicts, but it’s designed to work with any extension.
How do I test if clickable links work in my terminal or CI environment?
Run `phpstan` in your terminal and hover over file paths. For CI, check if your runner (e.g., GitHub Actions) supports ANSI escape codes. If not, verify `file://` URLs are parsed by your IDE or CI logs.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope