@mattab opened this Issue on March 6th 2019 Member

In some cases, commands can take a long time to run (for example searchengines:import command).
By default in many PHP setups, PHP is configured with display_errors=off

Steps to reproduce

  • set PHP max execution time to eg. 2 seconds
  • Execute a long running console command.
  • Current behavior: the command may fail after X seconds (or if PHP CLI memory limit is exhausted), and user does not see any error or message on screen. The console just exits and it could easily look like the command worked.
  • Expected behavior: the console would display the PHP error message and be clear that console failed.

(Maybe it's possible to do this by overwriting the display_errors ini setting in all console commands?)

@tsteur commented on March 6th 2019 Member

This should not be done in all commands as sometimes we may parse the response of a console output and this would break things. It should only be possible to be enabled when a specific option is passed to it. eg like -vvv.

If it was a fatal error, then it could be potentially printed but we may or may not do this already.

Also maybe we can put this into the backlog?

@mattab commented on March 20th 2019 Member

This should not be done in all commands as sometimes we may parse the response of a console output and this would break things.

when there is a PHP fatal error, things are already broken (silently), so it wouldn't make it worse?

Also maybe we can put this into the backlog?

this change would be quite valuable in helping us support users/customers as sometimes things fail silently. It's not a big use case though so removing from milestone for now.

@simivar commented on March 29th 2019 Contributor

I feel like Verbosity Levels of Symfony/Console component should be followed. Meaning that by default you get verbosity set to NORMAL and outputting every useful message - success AND error. Then you can quiet those with -q, --quiet options or get more with -v, -vv, -vvv.

Powered by GitHub Issue Mirror