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 install this formatter for Laravel projects using PHPStan?
Run `composer require --dev ticketswap/phpstan-error-formatter` and install `phpstan/extension-installer` for auto-loading. Alternatively, manually include `vendor/ticketswap/phpstan-error-formatter/extension.neon` in your PHPStan config. No Laravel-specific setup is needed.
Does this work with Laravel’s default PHPStan configuration?
Yes, it’s a drop-in replacement. Just add `errorFormat: ticketswap` to your `phpstan.neon` file. The package integrates via PHPStan’s extension system, so no changes to Laravel’s service container or Blade templates are required.
Will clickable links work in my terminal (e.g., Windows CMD, iTerm2, VS Code)?
Clickable links depend on terminal support. Modern terminals (iTerm2, VS Code, Windows Terminal) work well, while unsupported environments fall back to `file://` URLs. Test with your team’s primary terminal to confirm compatibility.
Can I use this formatter in CI/CD pipelines where PHPStan output is parsed programmatically?
Yes, the formatter maintains consistent output structure while improving readability. If your CI pipeline relies on parsing PHPStan errors, verify the new format aligns with your scripts—most parsing logic should remain compatible.
What PHPStan versions does this support, and is it safe for Laravel projects?
The package supports PHPStan 1.x and 2.x, covering Laravel’s typical adoption window. It’s safe for Laravel projects enforcing strict typing or PSR-12 compliance, as it doesn’t modify PHPStan’s core analysis—only the output presentation.
How does the syntax highlighting work, and are there edge cases?
Syntax highlighting uses naive regex to highlight FQCNs, variables, and types. It works for most cases but may miss dynamic class names or complex patterns. Validate against your codebase’s most intricate error scenarios to ensure reliability.
Can I integrate this with PhpStorm or VS Code for direct file navigation?
Yes, use the `editorUrl` parameter in your PHPStan config to force `file://` URLs, which work seamlessly in PhpStorm and VS Code. This bypasses terminal limitations while keeping links functional.
What if my Laravel project uses long file paths (e.g., Docker volumes)?
The formatter truncates long paths visually (e.g., `src/App/../Entity/User.php`) but preserves clickable links. For CI/CD or Docker environments, configure `editorUrl` to avoid terminal width issues.
Are there alternatives to this formatter, and why choose this one?
Alternatives include PHPStan’s default formatter or custom scripts, but this package offers unwrapped errors, clickable links, and minimalistic design without wrapping tables. It’s ideal for Laravel teams prioritizing CLI readability and IDE integration.
How do I handle PHPStan 3.0+ if this package doesn’t support it yet?
Monitor the GitHub repository for updates. If your project upgrades to PHPStan 3.0 before compatibility is added, consider forking the package or using a temporary workaround like PHPStan’s default formatter until support arrives.
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.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata