cakephp / phinx

PHP Database Migrations for Everyone
https://phinx.org
MIT License
4.45k stars 895 forks source link

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

Open InvisibleSmiley opened 4 months ago

InvisibleSmiley commented 4 months ago

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