Weave 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 Oneline

Phpstan Oneline Laravel Package

grifart/phpstan-oneline

A PHPStan extension that formats each reported error on a single line, making analysis output easier to read, search, and parse in CI logs or terminals. Useful for grep-friendly error reports and cleaner build output.

Deep Wiki
Context7

grifart/phpstan-oneline

grifart/phpstan-oneline provides a compact one-line error formatter for PHPStan, making static-analysis output easier to scan, grep, and consume in CI logs. Each reported error stays on a single line instead of spreading across multiple lines, keeping builds and terminal output concise.

  • One line per PHPStan error
  • Clean file, line, and message output
  • Easier log parsing and CI readability
  • Simple drop-in formatter configuration
  • Lightweight and focused on developer experience
Frequently asked questions about Phpstan Oneline
What is grifart/phpstan-oneline and how does it work with Laravel?
grifart/phpstan-oneline is a PHPStan error-output formatter that renders each analysis issue on a single clickable line. In Laravel projects it is used indirectly through PHPStan or Larastan as a development-only tool. It does not change PHPStan checks, Laravel runtime behavior, or application architecture.
How do I install grifart/phpstan-oneline in a Laravel project?
Install it as a Composer require-dev dependency in a repository that already runs PHPStan or Larastan. Then configure PHPStan's errorFormat to use the formatter class provided by the package. No service provider or application code changes are required.
Do I need Larastan to use grifart/phpstan-oneline?
No, the package formats PHPStan output and does not require Larastan. Larastan is only relevant when you want Laravel-aware PHPStan rules in addition to the formatter. If you already use Larastan, keep your existing analysis command and only adjust the error output configuration.
Which PHPStan versions does grifart/phpstan-oneline support?
The provided context does not list a supported PHPStan version matrix, so check the package's Composer constraint before adopting it. Validate compatibility with your installed PHPStan and Larastan versions together, then pin the package in composer.lock. Because it plugs into PHPStan's formatter API, recheck support during PHPStan upgrades.
How do I enable the grifart/phpstan-oneline formatter in phpstan.neon?
Add the package as a require-dev dependency and set PHPStan's errorFormat option to the formatter class supplied by the package. Confirm the exact formatter class name for your installed PHPStan version, then run your existing PHPStan or Larastan command unchanged. Keep the previous configuration documented so you can revert to PHPStan's default formatter quickly.
Does grifart/phpstan-oneline work in CI logs and GitHub Actions?
It is intended to make long PHPStan reports easier to scan in CI logs and terminals by keeping issues compact. Before rolling it out, test your CI runner in non-TTY mode and check how it handles ANSI sequences, hyperlinks, and long log lines. Compare the output with PHPStan's default formatter to ensure your log tooling still parses it correctly.
Does grifart/phpstan-oneline affect production or the Laravel runtime?
No, it is a development tooling package that formats PHPStan analysis output. It should be installed as a dev dependency and does not add a Laravel service provider or change request lifecycle behavior. Production deployments should remain unaffected when dev dependencies are excluded.
Will clickable error paths work in terminals, IDEs, and CI?
Clickable output depends on terminal or CI support for hyperlinks and ANSI formatting, so validate it in your local terminal, IDE terminal, and CI environment. Some runners and log viewers may strip links or render escape sequences poorly. If clickable paths are unreliable, decide whether one-line formatting alone still provides enough value.
Can one-line PHPStan output break CI annotations or log parsers?
It can interact poorly with CI log parsers, annotation processors, ANSI handling, or log truncation because it changes PHPStan's rendered error format. Test the output against your existing CI tooling before broad adoption. Keep PHPStan's default formatter documented as an immediate fallback if annotations or parsing break.
Is grifart/phpstan-oneline maintained and what are the alternatives?
The package has low adoption signal, so treat it as a small developer-tooling dependency that needs periodic compatibility checks. PHPStan's built-in default formatter is the immediate fallback and requires no extra dependency. Be prepared to remove or fork the package if it becomes incompatible with your PHPStan or Larastan upgrade path.
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core