Re: [VOTE] Reclassifying engine warnings

This is only part of a thread. view whole thread
  107362
October 2, 2019 13:23 nikita.ppv@gmail.com (Nikita Popov)
On Thu, Sep 26, 2019 at 9:41 AM Nikita Popov ppv@gmail.com> wrote:

> On Thu, Sep 12, 2019 at 2:17 PM Nikita Popov ppv@gmail.com> wrote: > >> Hi internals, >> >> I've opened the vote on //wiki.php.net/rfc/engine_warnings. >> >> There are 4 votes, all of them independent. The first 3 are for specific >> cases that were controversial during the discussion, the last one is for >> the remainder of the proposal. >> >> Voting closes 2019-09-26. >> > > Voting has closed with the final outcome being: > > * Undefined variables: 36 exception, 18 warning, 10 notice. Exception > declined with 56% in favor. Warning accepted with 84% combined majority. > * Undefined array index: 42 warning, 21 notice. Warning accepted with 2/3 > majority. > * Division by zero: 52 exception, 8 warning. Exception accepted with 87% > majority. > * Remainder: 54 yes, 3 no. Accepted with 95% majority. > > Regards, > Nikita >
This RFC is now mostly implemented. The parts that are still missing are: * Switching to DivisionByZeroError. I would like to add an fdiv() function before doing this and have started a separate thread on the topic. * The "Invalid argument supplied for foreach()" case. Christian Schneider has requested that this stay as a warning, and personally I'm okay with doing that. Unlike most of the other exception promotions, this one won't result in any VM simplifications/optimizations and I don't have a very strong reason to make it an exception. Does anyone else feel strongly about this? * The "Undefined array index" case. This one passed the vote with an exact 2/3 majority, so I'm a bit uncomfortable making changes here. This is also the only case where convincing usability concerns have been brought forward, primarily around the $array[$key]++ example. I'm not yet decided on what to do here and whether we should pursue additional library or language features first. Nikita
  107363
October 2, 2019 15:45 pollita@php.net (Sara Golemon)
On Wed, Oct 2, 2019 at 8:24 AM Nikita Popov ppv@gmail.com> wrote:

> * The "Undefined array index" case. This one passed the vote with an exact > 2/3 majority, so I'm a bit uncomfortable making changes here. This is also > the only case where convincing usability concerns have been brought > forward, primarily around the $array[$key]++ example. I'm not yet decided > on what to do here and whether we should pursue additional library or > language features first. > > We raised margins to 2/3 to avoid having to feel bad about narrow
majorities. I say this as someone who was quite tempted to vote "Keep Notice" which on retrospect would have changed the entire outcome based on that one vote. If this had been a simple majority vote and it had pass by like.... 52%-48%, then obviously that's not a mandate worth making potentially catastrophic changes over, but this is 67% to 33%, it feels like you're okay here. -Sara
  107364
October 2, 2019 16:11 bishop@php.net (Bishop Bettini)
On Wed, Oct 2, 2019 at 11:45 AM Sara Golemon <pollita@php.net> wrote:

> On Wed, Oct 2, 2019 at 8:24 AM Nikita Popov ppv@gmail.com> wrote: > > > * The "Undefined array index" case. This one passed the vote with an > exact > > 2/3 majority, so I'm a bit uncomfortable making changes here. This is > also > > the only case where convincing usability concerns have been brought > > forward, primarily around the $array[$key]++ example. I'm not yet decided > > on what to do here and whether we should pursue additional library or > > language features first. > > > > > We raised margins to 2/3 to avoid having to feel bad about narrow > majorities. I say this as someone who was quite tempted to vote "Keep > Notice" which on retrospect would have changed the entire outcome based on > that one vote. > > If this had been a simple majority vote and it had pass by like.... > 52%-48%, then obviously that's not a mandate worth making potentially > catastrophic changes over, but this is 67% to 33%, it feels like you're > okay here. >
I'd say it's ok, also: with 63 votes cast, I think we have a quorum and therefore representative opinion. (Per [1], this vote is second only in participation to typed properties 2.0, with 71 votes cast.) I personally abstained, seeing both sides of the argument. [1]:https://php-rfc-watch.beberlei.de/
  107365
October 3, 2019 19:53 zeev@php.net (Zeev Suraski)
On Wed, 2 Oct 2019 at 15:24 Nikita Popov ppv@gmail.com> wrote:

> > * The "Undefined array index" case. This one passed the vote with an exact > 2/3 majority, so I'm a bit uncomfortable making changes here.
I think that making this change on the edge of a single vote is less than ideal... Even if I’m known for my pro-BC bias 🙂 If you’re looking for an excuse for why we might consider not going through with it even though it did clear the needed majority (if barely) - the vote ended roughly 5 hours before two weeks passed from the point the vote was announced. It’s not outside the realm of possibility that given the zero margin - the vote might have ended differently if these 5hrs were available... But I’d say it’s up to you. Zeev