symfony/symfony — pull request #12081 by nicolas-grekas (2014-09-30 07:50:54+00:00)
Title: [Debug] make screaming configurable

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes, minor behavioral change only
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -

I wonder if this an acceptable change to you: I adjusted the semantic of the previously named "debug" argument and called it "scream".

"debug mode" is a too abstract name/description, that can't be correctly documented and needs code inspection to understand what setting true or false really does.

Instead, I propose controlling the "screaming" feature of the error handler with the same argument position.

As the error handler is currently not enabled in prod (see #12062), and because throwing is always enabled otherwise, this change has no effect at all on running application, except if someone built/configured its own listener and relyes on the "debug" flag behavior. IMHO this listener is an internally used thing and this can be acceptable.

It will allow greater config modularity if merged (allowing extensive configuration of the error handler by registering several listeners, one for each group of error levels).