Download the PHP package josrom/phpunit-unicode-printer without Composer
On this page you can find all versions of the php package josrom/phpunit-unicode-printer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package phpunit-unicode-printer
PHPUnit Unicode Printer
Requirements
- PHP 8.4+
- PHPUnit 13.x
Installation
Require the package with Composer:
Or update your require-dev block manually and run composer update:
Configuration (PHPUnit 10 / 11 / 12 / 13)
PHPUnit 10 removed the printerClass XML attribute and replaced the printer
architecture with an event-driven extension system, which PHPUnit 11, 12 and 13
keep. Register the printer as a <bootstrap> extension in your phpunit.xml:
Pick one of the three available extensions depending on the level of detail you want:
| Extension class | Output |
|---|---|
PHPUnit\Extension\UnicodePrinter |
One progress symbol per test, grouped by test directory. |
PHPUnit\Extension\UnicodePrinterClass |
One progress symbol per test, grouped by directory + class. |
PHPUnit\Extension\UnicodePrinterMethod |
One full row per test ((N/M) ✓ Class: Method (Xms)). |
Status symbols
| Status | Symbol | Color |
|---|---|---|
| Passed | ✓ | green |
| Failed | ✗ | red |
| Errored | ✗ | magenta |
| Warning | ✗ | yellow |
| Risky | ✓ | yellow |
| Deprecation | ⚠ | yellow |
| Notice | ℹ | cyan |
| Incomplete | ✓ | blue |
| Skipped | ✗ | blue |
To make a test be flagged as Risky, set
beStrictAboutTestsThatDoNotTestAnything="true" on <phpunit> and write a
test method without any assertion.
Disable PHPUnit's default progress output
PHPUnit 10/11/12/13 always renders its own dotted progress (.IIFWES…). To avoid two
progress streams interleaving, run PHPUnit with the --no-progress flag:
A convenient way is to alias it in your composer.json scripts section:
Note:
--no-progressis a CLI-only option; there is no equivalent attribute on the<phpunit>element.
Migrating from older versions
The old printerClass="..." attribute was removed by PHPUnit 10. Replace any
of these:
with the corresponding <extensions> block shown above. The original three
class names map to the new ones as:
| Before (PHPUnit ≤ 9) | After (PHPUnit 10 / 11 / 12 / 13) |
|---|---|
PHPUnit\Printer |
PHPUnit\Extension\UnicodePrinter |
PHPUnit\PrinterClass |
PHPUnit\Extension\UnicodePrinterClass |
PHPUnit\PrinterMethod |
PHPUnit\Extension\UnicodePrinterMethod |
Older PHPUnit versions
For previous versions of PHPUnit use these tags:
| PHPUnit | Tag |
|---|---|
| 12 | 12.* |
| 11 | 11.* |
| 10 | 10.* |
| 9 | 9.* |
| 8 | 0.4.* or 8.* |
| 7 | 0.3.* or 7.* |
| 6 | 0.2.* |
| <5 | 0.1.* |