sempro/phpunit-pretty-print
Pretty-print PHPUnit test output for cleaner, more readable console runs. sempro/phpunit-pretty-print adds a nicer, compact format that highlights failures and progress, helping you scan results faster while keeping compatibility with standard PHPUnit workflows.
Install the package via Composer:
composer require --dev sempro/phpunit-pretty-print
No configuration is required to start—just run your tests as usual (phpunit). The package automatically hooks into PHPUnit’s output formatting. For projects with custom bootstrap or configuration, ensure phpunit.xml doesn’t override the default output printer (if using printerFile, skip this—just load via Composer’s autoloader as normal).
Your first use case: run a small test suite locally to see immediately improved readability—e.g., colored pass/fail indicators, grouped failures, and compact stack traces.
--dev require and run ./vendor/bin/phpunit. The package registers itself as the default output printer (via PHPUnit\Runner\Version::getVersion() detection and composer's extra.phpunit auto-discovery).phpunit.xml’s colors to never in CI (or use --no-coverage if needed) to preserve structured clarity without ANSI codes.junit or testdox), this package does not interfere—it only enhances the default text and progress formatters. For full control, explicitly declare the printer class:
<phpunit printerClass="Sempro\PHPUnit\PrettyPrinter\Printer">
phpspec/prophecy or brianium/paratest—output remains readable even when parallelizing.phpunit --no-ansi or set <php><env name="TERM" value="dumb"/></php> in phpunit.xml./vendor/ paths), but excessive nesting may still clutter output. Add custom trace filters in phpunit.xml if needed.Printer class is possible. Override methods like printResult() for team-specific formatting (e.g., adding time deltas or emoji prefixes).--log-junit), the pretty-printer only affects console output—JUnit/XML logs remain untouched. Use this to keep logs machine-readable while improving human-facing console feedback.How can I help you explore Laravel packages today?