Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress should be written to stderr #1612

Closed
exussum12 opened this issue Aug 15, 2017 · 4 comments
Closed

Progress should be written to stderr #1612

exussum12 opened this issue Aug 15, 2017 · 4 comments

Comments

@exussum12
Copy link
Contributor

exussum12 commented Aug 15, 2017

Postix standards suggest the following
https://en.wikipedia.org/wiki/Standard_streams#Standard_error_.28stderr.29

Standard error is another output stream typically used by programs to output error messages or diagnostics.

Symphony console, phpstan etc all follow this (other language tools such as webpack also follow this standard)

#1606

Was made to correct this and separate the progress output.

This would keep the same behavior in the following use cases

phpcs src
phpcs -p src
phpcs --report-full=./myfilename.txt -p src

stderr and stdout are displayed together on a terminal, so it would not matter which is written to.

it would break it in the following case
phpcs -p src > savedOutput.txt

as saved output would now not contain the progress output.

This would make the --report-full= option function the same as > which is a much more standard way of handling output options

and improve the following

phpcs -p src | grep something

as the progress would now be printed and not sent to the pipe

@exussum12
Copy link
Contributor Author

@gsherwood I did make a PR for this which was rejected. Ive seen there is a tag of PHPCS v3 now, Shall I just raise the PR again ?

@gsherwood
Copy link
Member

Shall I just raise the PR again ?

This isn't high on the list of things to look into, so I'd suggest not sending one in. I know I wont get around to reviewing it either.

@jrfnl
Copy link
Contributor

jrfnl commented Oct 7, 2018

What @exussum12 says does actually make a lot of sense to me. Would be nice to keep it on the "wish list".

@gsherwood gsherwood added this to the 4.0.0 milestone Apr 5, 2019
@gsherwood
Copy link
Member

All status, debug, and progress output is now being written to STDERR, as of d4f33db

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants