mikeerickson / phpunit-pretty-result-printer

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

Declaration not compatible with phpunit 7.0 #43

Closed rdpascua closed 6 years ago

rdpascua commented 6 years ago
phpunit --printer=Codedungeon\\PHPUnitPrettyResultPrinter\\Printer
PHP Fatal error:  Declaration of Codedungeon\PHPUnitPrettyResultPrinter\Printer::writeProgress($progress) must be compatible with PHPUnit\TextUI\ResultPrinter::writeProgress($progress): void in /home/xxx/vendor/codedungeon/phpunit-result-printer/src/Printer.php on line 36
mikeerickson commented 6 years ago

I am working on a fix for this every issue

mikeerickson commented 6 years ago

Fixed in 0.9.0 release

nabeelio commented 6 years ago

Seems like this is broken again, I'm on 0.9.3 and PHPUnit 7.1.1.


PHP Stack trace:
PHP   1. {main}() /Users/nshahzad/dev/phpvms/vendor/phpunit/phpunit/phpunit:0
PHP   2. PHPUnit\TextUI\Command::main() /Users/nshahzad/dev/phpvms/vendor/phpunit/phpunit/phpunit:53
PHP   3. PHPUnit\TextUI\Command->run() /Users/nshahzad/dev/phpvms/vendor/phpunit/phpunit/src/TextUI/Command.php:151
PHP   4. PHPUnit\TextUI\Command->handleArguments() /Users/nshahzad/dev/phpvms/vendor/phpunit/phpunit/src/TextUI/Command.php:162
PHP   5. PHPUnit\TextUI\Command->handlePrinter() /Users/nshahzad/dev/phpvms/vendor/phpunit/phpunit/src/TextUI/Command.php:816
PHP   6. class_exists() /Users/nshahzad/dev/phpvms/vendor/phpunit/phpunit/src/TextUI/Command.php:929
PHP   7. spl_autoload_call() /Users/nshahzad/dev/phpvms/vendor/phpunit/phpunit/src/TextUI/Command.php:929
PHP   8. Composer\Autoload\ClassLoader->loadClass() /Users/nshahzad/dev/phpvms/vendor/phpunit/phpunit/src/TextUI/Command.php:929
PHP   9. Composer\Autoload\includeFile() /Users/nshahzad/dev/phpvms/vendor/composer/ClassLoader.php:322
PHP  10. include() /Users/nshahzad/dev/phpvms/vendor/composer/ClassLoader.php:444```
mikeerickson commented 6 years ago

The latest version 0.13.0 has been updated to address this issue with PHPUnit 7.1.1. They changed the signature from 7.0

It changed 3x in 6.5 -> 7.0.x -> 7.1.x

mikeerickson commented 6 years ago

The latest version 0.13.0 has been updated to address this issue with PHPUnit 7.1.1. They changed the signature from 7.0

It changed 3x in 6.5 -> 7.0.x -> 7.1.x

nabeelio commented 6 years ago

Thanks. It's a little annoying that PHP requires the signature to match. Makes it hard to override things.

mikeerickson commented 6 years ago

Tell me about it! And to force the change from PHPUnit perspective between 7.0 and 7.1 is annoying. I am currently working on keeping it from being broken at least the rest of 7.x (7.2, 7.3 etc)