Hello Mark and the list,

Le mar. 15 mars 2022 à 21:36, Mark Randall <marand...@php.net> a écrit :

> Who knows, maybe PHP 9 can be the version that removes remove *all*
> warnings from the zend engine.
>

This is not far from the reason why I voted "no".

I am not against the fact this warning becomes an error per se. I am just
not very fan of cherry-picking an individual kind of problem (read:
notice/warning/error/...) and changing it without a more global frame.

While it may not be a good practice. It's not that we cannot recover from
that, it is more that we don't want to. This doesn't match really the
notion of "error" which is not very much documented, apart from
https://www.php.net/manual/en/errorfunc.constants.php:

"E_ERROR: Fatal run-time errors. These indicate errors that can not be
recovered from, such as a memory allocation problem. Execution of the
script is halted."

Currently E_WARNING is documented as:
"Run-time warnings (non-fatal errors). Execution of the script is not
halted."

This describes how the core reacts, not when it is supposed to happen.

This could potentially be extended to:
"Run-time warnings (non-fatal errors) that are likely to denote bad
programming practice (like the use of something undefined) that are usually
solved with code changes. Execution of the script is not halted."

But then this wouldn't be true anymore if this RFC passes as it would
result in:
Undefined variables: Error
Undefined index: Warning
Undefined property: Warning

IMHO, this leads to something more inconsistent than what we have now.

I know other RFCs could target the other aspects. But there is no way to
vote "yes, provided that all other RFCs under the same umbrella would pass
for the same version".
This is probably a limitation of our current RFC process, but in order to
maintain as much consistency as possible, I see no other option than voting
"no" even though I am +1 on the principle.

Kind regards,
Patrick

Reply via email to