Re: Make error_reporting=E_ALL the default
| From: | Zeev Suraski | Date: | Fri, 30 Aug 2019 09:45:44 +0000 |
| Subject: | Re: Make error_reporting=E_ALL the default | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-106812@lists.php.net to get a copy of this message | ||
> On 30 Aug 2019, at 12:33, Nikita Popov <nikita.ppv@gmail.com> wrote:
>
> Hi internals,
>
> Relating to the recent discussions on undefined variables & co. One thing
> that is particularly annoying about the undefined variable case is that our
> default error_reporting level (without a php.ini) does not include E_NOTICE.
>
> Thankfully distros do tend to have more reasonable defaults, but if you
> spend as much time with custom PHP builds as I do, not seeing *anything*
> for undefined variables is a pretty big annoyance.
>
> Does anyone see an issue with making error_reporting=E_ALL the default in
> PHP 8? It can of course still be manually downgraded via php.ini and
> php.ini-production will retain the existing recommendation that excludes
> E_DEPRECATED/E_STRICT.
>
> PR: https://github.com/php/php-src/pull/4659
By the way - I'd consider going a bit further than that, and re-sync our internal defaults with
the values of php.ini-development. In the past - when we had -dist and -recommended - the intended
behavior was that having php.ini-dist as your php.ini would be identical to not having a php.ini
file at all. I think it can be useful if we do the same for php.ini-development (by changing the
internal defaults to correspond to it of course, not the other way around) instead of having to
agree individually on each change. For the future, agreeing on a change in php.ini-development
would directly imply changing the internal defaults.
Zeev