yamadashy/phpstan-friendly-formatter
PHPStan Friendly Formatter enhances PHPStan output with code frames around errors, a summary of error identifiers and counts, and clean, readable reports. Install via Composer, include the extension in phpstan.neon, and set errorFormat to friendly.
Install the package via Composer:
composer require --dev yamadashy/phpstan-friendly-formatter
Then run PHPStan with the formatter using the --formatter option:
vendor/bin/phpstan --formatter=friendly
If you use phpstan.neon (e.g., phpstan.neon.dist), you can configure it permanently:
parameters:
formatting:
formatter: friendly
This is the fastest way to see immediate improvements in output readability—no code changes required. Start with local development, then adopt it in CI for consistent feedback. With v1.4.0+, CI-specific annotations (e.g., GitHub PR diff annotations or TeamCity build log entries) appear automatically when detected—no configuration needed.
--formatter=friendly to your composer.json scripts (e.g., "phpstan": "phpstan analyse src --formatter=friendly") for quick, actionable feedback.phpstan.neon include in your root, enabling formatter adoption across repos and developers without per-command boilerplate.--debug or --xdebug flags—the formatter renders verbose stack traces cleanly while preserving structured data for CI tools.--formatter=friendly. Now benefits from CI-adjacent output even locally (e.g., rich summaries), and ensures local logs match CI verbosity levels.friendly, not yamadashy/phpstan-friendly-formatter—no namespace in --formatter= argument.phpstan.neon rules and level settings remain unchanged. If you see fewer errors, double-check it’s not being suppressed by log redirection.--no-ansi or set PHPSTAN_FORMATTER_COLOR=0.phpstan-to-baseline—error counts and paths are preserved even when annotations are active.relativePathHelper—update if you’ve encountered cryptic PHPStan startup errors.phpstan --memory-limit=2G for large repos.How can I help you explore Laravel packages today?