mikeerickson / phpunit-pretty-result-printer

PHPUnit Pretty Result Printer -- make your PHPUnit tests look pretty!
MIT License
1.2k stars 71 forks source link

php 7.0 compatibility broken #73

Closed ecornelisse closed 6 years ago

ecornelisse commented 6 years ago

The composer states: "php": "^7.0",

while the code contains:

public function startTest(\PHPUnit\Framework\Test $test): void

will result in:

PHPUnit 6.5.7 by Sebastian Bergmann and contributors.

Fatal error: Uncaught TypeError: Return value of Codedungeon\PHPUnitPrettyResultPrinter\_ResultPrinter::startTest() must be an instance of Codedungeon\PHPUnitPrettyResultPrinter\void, none returned in vendor/codedungeon/phpunit-result-printer/src/Printer.php on line 27

TypeError: Return value of Codedungeon\PHPUnitPrettyResultPrinter\_ResultPrinter::startTest() must be an instance of Codedungeon\PHPUnitPrettyResultPrinter\void, none returned in vendor/codedungeon/phpunit-result-printer/src/Printer.php on line 27

:void return types only work in php 7.2+ and therefor it will break when using < 7.2

mikeerickson commented 6 years ago

You will need to install the compatibility version 0.11.2