llaville / php-compatinfo

Library that find out the minimum version and the extensions required for a piece of code to run
https://llaville.github.io/php-compatinfo/7.1/
Other
373 stars 20 forks source link

unusable report file #51

Closed remicollet closed 12 years ago

remicollet commented 12 years ago

When using print, with --full, --recursive and --report-file option, the result file contains the progress information, which make it nearly unusable.

llaville commented 12 years ago

@remicollet Could you precise what version you used, and in what context ?

I've not this problem with the latest version 2.9.0

remicollet commented 12 years ago

Of course 2.9.0.

Seems of order change this strange behavior $ phpci print --report=full --recursive --report-file full.txt => correct output, but no file generated

$ print --report=full --recursive --report-file /tmp/full.txt . => corrupted output, file ok

Hum... and I cannot reproduce the case where progress goes to file...

llaville commented 12 years ago

@remicollet With your process samples, I've tried it myself and got (on Windows with PHP 5.3.18)

phpci print --report=full --recursive --report-file full.txt d:\pear.phpunit.de\PHPUnit-3.7.7\PHPUnit

=> no file generated, all results goes to standard output

phpci print --report=full --recursive --report-file /temp/full.txt d:\pear.phpunit.de\PHPUnit-3.7.7\PHPUnit

=> file generated with correct results (no progress bar inside report file)

llaville commented 12 years ago

I'll check later (this evening) to learn more and try to apply a fix

llaville commented 12 years ago

@remicollet Tell me if you got again problems with --report-file option, after my fix.

remicollet commented 12 years ago

The fix solve the issue with report file name.

The progress output still corrupt. Only the first one is ok

I think, we need a simple echo "\n" after each work.

output example: 82 / 82 [+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>] 100.00% 1 / 82 [>-----------------------------------------------------------] 1.22% 2 / 82 [+>----------------------------------------------------------] 2.44% 3 / 82 [++>---------------------------------------------------------]

remicollet commented 12 years ago

Tried

        if ($consoleProgress) {
            $progress->finish();
+            echo "\n";
        }

It solves the problem.

llaville commented 12 years ago

@remi Tell me if you've still got any problem. If not you can close this issue !

remicollet commented 12 years ago

Thanks.