phpunit-speedtrap icon indicating copy to clipboard operation
phpunit-speedtrap copied to clipboard

Replace echo to flushable stdout

Open andras-tim opened this issue 8 years ago • 10 comments

Added outPath and forceFlush arguments

FYI: This is useful, when a custom phpunit printer explicit flushes its results.

andras-tim avatar Mar 27 '17 15:03 andras-tim

This was sent in #19 too before

andras-tim avatar Mar 27 '17 15:03 andras-tim

Dear @johnkary ,

On our several systems we can't change buffering strategy, and the only one solution for continuous phpunit status printing was a flushing results printer. When the result is printing with explicit flushes, your stuff printed the output after the end of phpunit output, what wasn't so good.

- In other hand, the phpunit result printer supports out of the box the flushing, therefore I think, this not extremely bad idea, check my example in https://github.com/johnkary/phpunit-speedtrap/pull/19#issuecomment-227512194

So, I tried to implement the flushing in your stuff, but I couldn't reach the flushing without writing php://stdout directly.

- There looked good a freely configurable output when I wrote the fopen(), e.g. for a file output for this result, or "red highlighting" in docker with php://stderr.

So this is the history/reason of these two arguments.

andras-tim avatar Mar 29 '17 21:03 andras-tim

Dear @johnkary, do you have any update?

andras-tim avatar Apr 06 '17 23:04 andras-tim

Where we sticked @johnkary? Should I help you?

andras-tim avatar Apr 19 '17 09:04 andras-tim

@andras-tim Sorry, very busy with paid work. Will have time to look closer sometime in May.

johnkary avatar Apr 19 '17 22:04 johnkary

@johnkary, is there any news?

andras-tim avatar May 22 '17 16:05 andras-tim

ping

andras-tim avatar Jun 08 '17 11:06 andras-tim

@andras-tim I've begun looking at this and looks like it will work! I'll give it a final look using a custom result printer to be sure.

In the meantime I tried using your changes to phpunit-speedtrap with whatthejeff/nyancat-phpunit-resultprinter, the PHPUnit results printer that prints Nyancat output for test results. That library didn't support PHPUnit 6 yet so I fixed it and PR'd 😋

johnkary avatar Jul 03 '17 17:07 johnkary

Thank you @johnkary!

andras-tim avatar Jul 05 '17 11:07 andras-tim

@johnkary, is there any news?

andras-tim avatar Oct 24 '18 15:10 andras-tim