sebastianbergmann / phpcov

TextUI frontend for php-code-coverage
BSD 3-Clause "New" or "Revised" License
227 stars 58 forks source link

Merge command returning null instead of int #94

Closed ravanscafi closed 4 years ago

ravanscafi commented 4 years ago

Hello, I'm trying to run merge and it looks like it is working, all the files are generated. But the return value of the execute method is null, causing the command to fail.

phpcov merge build/logs --clover build/logs/clover.xml

Error:

PHP Fatal error:  Uncaught TypeError: Return value of "SebastianBergmann\PHPCOV\MergeCommand::execute()" must be of the type int, NULL returned. in phar:///usr/local/bin/phpcov/symfony/console/Command/Command.php:258
Stack trace:
#0 phar:///usr/local/bin/phpcov/symfony/console/Application.php(925): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 phar:///usr/local/bin/phpcov/symfony/console/Application.php(265): Symfony\Component\Console\Application->doRunCommand(Object(SebastianBergmann\PHPCOV\MergeCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 phar:///usr/local/bin/phpcov/src/Application.php(56): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 phar:///usr/local/bin/phpcov/symfony/console/Application.php(141): SebastianBergmann\PHPCOV\Applicat in phar:///usr/local/bin/phpcov/symfony/console/Command/Command.php on line 258

Fatal error: Uncaught TypeError: Return value of "SebastianBergmann\PHPCOV\MergeCommand::execute()" must be of the type int, NULL returned. in phar:///usr/local/bin/phpcov/symfony/console/Command/Command.php:258
Stack trace:
#0 phar:///usr/local/bin/phpcov/symfony/console/Application.php(925): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 phar:///usr/local/bin/phpcov/symfony/console/Application.php(265): Symfony\Component\Console\Application->doRunCommand(Object(SebastianBergmann\PHPCOV\MergeCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 phar:///usr/local/bin/phpcov/src/Application.php(56): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 phar:///usr/local/bin/phpcov/symfony/console/Application.php(141): SebastianBergmann\PHPCOV\Applicat in phar:///usr/local/bin/phpcov/symfony/console/Command/Command.php on line 258
teohhanhui commented 4 years ago

Has this been fixed? We're also seeing this in our CI.

teohhanhui commented 4 years ago

Uhh, looks like this has been fixed in #95

Waiting for a release then... :smile: