Skip to content

Progress should be written to stderr #1612

Closed
@exussum12

Description

@exussum12

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions