php_koans
php_koans copied to clipboard
Migrate the PHPUnit custom printers to the event system
Because PHPUnit 10 did away with the printerClass
config setting, the band-new-developer friendly output no longer works. There is a new event base architecture that needs to be used, either directly or some existing adapter plugin. I would rather not use plugin/library for several reasons, the primary being I don't want to add to the installation process for new users.
There are a few projects that have accomplished migrating to the event system and it's worth looking at how they did it and follow their pattern. Examples are czim/phpunit-printer and paratest. The latter looks more straight forward, but there might something I'm missing.
So we need to migrate https://github.com/akoebbe/php_koans/blob/master/KoansLib/KoanPrinter.php to work with phpunit 10+