Nikita Popov wrote on 22/02/2015 22:30:
Hi internals!
I would like to propose reclassifying our few existing E_STRICT notices and
removing this error category:
https://wiki.php.net/rfc/reclassify_e_strict
As we don't really have good guidelines on when which type of error should
be thrown, I'm mainly going by what category other similar errors use. I'm
open to suggestions, but hope this will not deteriorate into total bikeshed.
I think my preferred approach would be to first come up with some
defined criteria for different levels of warning, and then look at how
many we need, and how well they map to the current situation.
At the moment we have 3 severity levels: E_STRICT, E_NOTICE, and
E_WARNING. Many people will run with only E_WARNING turned on, because
of the number of messages in the lower levels. There have been a couple
of requests recently to raise messages between these severities, which I
mentioned before leads to a kind of "inflation" unless we also lower the
severity of other messages.
It may be that we only need two different severities, but as you say, we
don't have any guidelines for how to use those two, so dumping a few
extra things in E_NOTICE and a few in E_WARNING doesn't really make
things any clearer to the user.
It's also possible that we need more than two *categories* of warning,
but not as a strict hierarchy of *severities* - the aim of the
classification being to allow the user to make decisions about which
warnings they want to see or handle. It's already hard to say whether
E_DEPRECATED has a relative severity, or is actually orthogonal; perhaps
there should be combinations like E_IMPORTANT_DEPRECATED = E_DEPRECATED
+ E_WARNING...
Obviously, this is a tougher job than what you have proposed, and since
I keep mentioning it, I should probably stop talking and start doing,
but I'm not convinced of the value of tinkering around the edges without
tackling the underlying problem.
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php