Download the PHP package vedmant/phpunit-pretty-result-printer without Composer
On this page you can find all versions of the php package vedmant/phpunit-pretty-result-printer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vedmant/phpunit-pretty-result-printer
More information about vedmant/phpunit-pretty-result-printer
Files in vedmant/phpunit-pretty-result-printer
Package phpunit-pretty-result-printer
Short Description PHPUnit Pretty Result Printer
License MIT
Homepage https://packagist.org/packages/vedmant/phpunit-pretty-result-printer
Informations about the package phpunit-pretty-result-printer
PHPUnit Pretty Result Printer
Version 1.0.0 — updated for PHPUnit 11 / 12 and PHP 8.2+ (including PHP 8.3 / 8.4 / 8.5).
📦 Packagist: vedmant/phpunit-pretty-result-printer
This is a maintained fork of codedungeon/phpunit-result-printer. The original package stopped at PHPUnit 9. PHPUnit 10 removed printerClass / --printer, so this rewrite is a PHPUnit extension that still prints the same compact progress line.
PHPUnit still prints its own failure details and summary. Only progress is replaced ($facade->replaceProgressOutput()), so you do not need --no-progress.
The class-name column uses about 60% of the actual terminal width (40–60 characters) so typical test names stay readable. Markers then fill the rest of the line, one space apart (✔ ✔). Very long names still get a leading ellipsis.
Installation
Install from Packagist:
Requires PHP 8.2+ and PHPUnit 11 or 12.
If you previously used the abandoned codedungeon/phpunit-result-printer package, this fork replaces it so Composer can swap them cleanly.
Register the extension
Add the following to phpunit.xml (or phpunit.xml.dist):
Optional initialization script
Copies default phpunit-printer.yml to the project root and writes the <extensions><bootstrap …> block into phpunit.xml (and removes a leftover printerClass attribute if present):
Do not use --printer=… or printerClass= — those options no longer exist in PHPUnit 10+.
AnyBar Integration
If you have AnyBar installed, enable it with cd-printer-anybar: true in phpunit-printer.yml. It is off by default (CI-friendly). AnyBar is only used on macOS.
Configuration Options
Create a phpunit-printer.yml file in your application root to override the package default (or anywhere up the parent tree. It will search recursively up the tree until a configuration file is found. If not found, the package default in src/phpunit-printer.yml is used).
Options
| Property Name | Default | Description |
|---|---|---|
cd-printer-hide-class |
false | Hides the display of the test class name |
cd-printer-simple-output |
false | Uses the default PHPUnit markers (but still uses this printer) |
cd-printer-show-config |
true | Show path to used configuration file |
cd-printer-hide-namespace |
true | Hide test class namespaces (will only show the class name) |
cd-printer-anybar |
false | Enable AnyBar (ignored if AnyBar is not installed / not macOS) |
cd-printer-anybar-port |
1738 | Define AnyBar port number |
cd-printer-dont-format-classname |
false | Show entire classname without padding / ellipsis |
- Class names are padded and, if needed, ellipsized to about 60% of the terminal width (40–60 characters) unless
cd-printer-dont-format-classnameistrue - If
cd-printer-dont-format-classnameistrue, nothing is formatted and the full classname is displayed
Markers
Customize markers by modifying phpunit-printer.yml.
| Marker | Value * |
|---|---|
| cd-pass | "✔ " |
| cd-fail | "✖ " |
| cd-error | "⚈ " |
| cd-skipped | "⇢ " |
| cd-incomplete | "∅ " |
| cd-risky | "⌽ " |
| cd-warning | "⚠ " |
| cd-deprecation | "▲ " |
| cd-notice | "ℹ " |
* Notice the single space after each marker. That is the gap between checks (✔ ✔); keep it when creating your own custom markers..
License
Copyright © 2017-2026 Mike Erickson and contributors
Released under the MIT license
Credits
Original package by Mike Erickson
E-Mail: [email protected]
Twitter: @codedungeon
Website: https://github.com/mikeerickson
Fork: https://github.com/vedmant/phpunit-pretty-result-printer
Screenshot
All versions of phpunit-pretty-result-printer with dependencies
phpunit/phpunit Version ^11.0 || ^12.0
symfony/yaml Version ^5.4 || ^6.0 || ^7.0 || ^8.0
2bj/phanybar Version ^1.0