Skip to content

(At least) Non-interactive commands should write errors to STDERR #2270

@InvisibleSmiley

Description

@InvisibleSmiley

Right now commands like migrate write errors to STDOUT. This is wrong. Errors, especially from commands that are commonly used non-interactively, need to be written to STDERR so that scripts executing Phinx can easily distinguish between information (STDOUT) and errors (STDERR), possibly redirecting either of them to different locations.

Here's how:
https://symfony.com/doc/current/console/style.html#writing-to-the-error-output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions