mikeerickson / phpunit-pretty-result-printer

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

Fresh installation gives bunch of warnings #69

Closed napestershine closed 6 years ago

napestershine commented 6 years ago

HI @mikeerickson

I just installed in my fresh new project. Works well. Thanks so much.

But it also sends a bunch of warnings.


$ ./vendor/bin/phpunit --printer=Codedungeon\\PHPUnitPrettyResultPrinter\\Printer
PHP Warning:  Declaration of Codedungeon\PHPUnitPrettyResultPrinter\_ResultPrinter::writeProgress(string $progress): void should be compatible with PHPUnit\TextUI\ResultPrinter::writeProgress($progress): void in project\vendor\codedungeon\phpunit-result-printer\src\Printer.php on line 23
PHP Stack trace:
PHP   1. {main}() project\vendor\phpunit\phpunit\phpunit:0
PHP   2. PHPUnit\TextUI\Command::main() project\vendor\phpunit\phpunit\phpunit:53
PHP   3. PHPUnit\TextUI\Command->run() project\vendor\phpunit\phpunit\src\TextUI\Command.php:153
PHP   4. PHPUnit\TextUI\Command->handleArguments() project\vendor\phpunit\phpunit\src\TextUI\Command.php:169
PHP   5. PHPUnit\TextUI\Command->handlePrinter() project\vendor\phpunit\phpunit\src\TextUI\Command.php:861
PHP   6. class_exists() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
PHP   7. spl_autoload_call() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
PHP   8. Composer\Autoload\ClassLoader->loadClass() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
PHP   9. Composer\Autoload\includeFile() project\vendor\composer\ClassLoader.php:322
PHP  10. include() project\vendor\composer\ClassLoader.php:444

Warning: Declaration of Codedungeon\PHPUnitPrettyResultPrinter\_ResultPrinter::writeProgress(string $progress): void should be compatible with PHPUnit\TextUI\ResultPrinter::writeProgress($progress): void in project\vendor\codedungeon\phpunit-result-printer\src\Printer.php on line 23

Call Stack:
    0.2457     353128   1. {main}() project\vendor\phpunit\phpunit\phpunit:0
    0.3309    2189864   2. PHPUnit\TextUI\Command::main() project\vendor\phpunit\phpunit\phpunit:53
    0.3309    2194424   3. PHPUnit\TextUI\Command->run() project\vendor\phpunit\phpunit\src\TextUI\Command.php:153
    0.3309    2194424   4. PHPUnit\TextUI\Command->handleArguments() project\vendor\phpunit\phpunit\src\TextUI\Command.php:169
    0.8292    4101208   5. PHPUnit\TextUI\Command->handlePrinter() project\vendor\phpunit\phpunit\src\TextUI\Command.php:861
    0.8297    4103360   6. class_exists() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
    0.8297    4103424   7. spl_autoload_call() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
    0.8297    4103488   8. Composer\Autoload\ClassLoader->loadClass() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
    0.8297    4103488   9. Composer\Autoload\includeFile() project\vendor\composer\ClassLoader.php:322
    0.8307    4164120  10. include('project\vendor\codedungeon\phpunit-result-printer\src\Printer.php') project\vendor\composer\ClassLoader.php:444

PHP Warning:  Declaration of Codedungeon\PHPUnitPrettyResultPrinter\_ResultPrinter::writeProgressWithColor(string $progress, string $buffer): void should be compatible with PHPUnit\TextUI\ResultPrinter::writeProgressWithColor($color, $buffer): void in project\vendor\codedungeon\phpunit-result-printer\src\Printer.php on line 23
PHP Stack trace:
PHP   1. {main}() project\vendor\phpunit\phpunit\phpunit:0
PHP   2. PHPUnit\TextUI\Command::main() project\vendor\phpunit\phpunit\phpunit:53
PHP   3. PHPUnit\TextUI\Command->run() project\vendor\phpunit\phpunit\src\TextUI\Command.php:153
PHP   4. PHPUnit\TextUI\Command->handleArguments() project\vendor\phpunit\phpunit\src\TextUI\Command.php:169
PHP   5. PHPUnit\TextUI\Command->handlePrinter() project\vendor\phpunit\phpunit\src\TextUI\Command.php:861
PHP   6. class_exists() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
PHP   7. spl_autoload_call() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
PHP   8. Composer\Autoload\ClassLoader->loadClass() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
PHP   9. Composer\Autoload\includeFile() project\vendor\composer\ClassLoader.php:322
PHP  10. include() project\vendor\composer\ClassLoader.php:444

Warning: Declaration of Codedungeon\PHPUnitPrettyResultPrinter\_ResultPrinter::writeProgressWithColor(string $progress, string $buffer): void should be compatible with PHPUnit\TextUI\ResultPrinter::writeProgressWithColor($color, $buffer): void in project\vendor\codedungeon\phpunit-result-printer\src\Printer.php on line 23

Call Stack:
    0.2457     353128   1. {main}() project\vendor\phpunit\phpunit\phpunit:0
    0.3309    2189864   2. PHPUnit\TextUI\Command::main() project\vendor\phpunit\phpunit\phpunit:53
    0.3309    2194424   3. PHPUnit\TextUI\Command->run() project\vendor\phpunit\phpunit\src\TextUI\Command.php:153
    0.3309    2194424   4. PHPUnit\TextUI\Command->handleArguments() project\vendor\phpunit\phpunit\src\TextUI\Command.php:169
    0.8292    4101208   5. PHPUnit\TextUI\Command->handlePrinter() project\vendor\phpunit\phpunit\src\TextUI\Command.php:861
    0.8297    4103360   6. class_exists() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
    0.8297    4103424   7. spl_autoload_call() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
    0.8297    4103488   8. Composer\Autoload\ClassLoader->loadClass() project\vendor\phpunit\phpunit\src\TextUI\Command.php:948
    0.8297    4103488   9. Composer\Autoload\includeFile() project\vendor\composer\ClassLoader.php:322
    0.8307    4164120  10. include('project\vendor\codedungeon\phpunit-result-printer\src\Printer.php') project\vendor\composer\ClassLoader.php:444
mikeerickson commented 6 years ago

What version of PHPUnit are you using?

mikeerickson commented 6 years ago

@napestershine All should be good to go now, my apologies for issues. Please install the latest version 0.13.0

napestershine commented 6 years ago

@mikeerickson shall i do composer update ?

mikeerickson commented 6 years ago

Yes indeed

napestershine commented 6 years ago

working perfectly. 👍

mikeerickson commented 6 years ago

Awesome, glad to hear