Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106714 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30818 invoked from network); 28 Aug 2019 12:35:38 -0000 Received: from unknown (HELO mail-io1-f50.google.com) (209.85.166.50) by pb1.pair.com with SMTP; 28 Aug 2019 12:35:38 -0000 Received: by mail-io1-f50.google.com with SMTP id p12so4732424iog.5 for ; Wed, 28 Aug 2019 03:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VmFgNta6JSItdLXxY7C899+tsrc0AFFjmh0KddqcXh4=; b=R+z0zK4B90Py0+CWxecvuH0xkkcvi7bMdXZ91guLUbMgi1pSftaMpYpfkYzU4C4t37 KnY8RVduNjob7yjil6RPLZl0rNq2NuTGz5kT+LfD1/DSZtgDy2fK2paOf+9RXrLdQPyF O/AewdGPUh1Vako0ERsaqHcatCOqMJ8GTu11z1HIO6tFdaz7Q9NIuSWAo3ChZccM7pi7 VAVmRgzzJP9tutmRL0V5j5B+l2gZihc164ktI5jePMmSrbdSc0lJAFXXcZZhDs1h7oBz EZ0NTAHBkk2v2kIedU4RTjBjy2WodA7fox9WnsaCgomFYL9/fQggko5U4jKM6WHLfh6p 4ang== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VmFgNta6JSItdLXxY7C899+tsrc0AFFjmh0KddqcXh4=; b=LmLEXYaEF504Yp28F5r5guCiVr+ZsXeHePyxJyORcQgGONQXyN/hD0Znb+1MxtGeKE 2hZbs8Nt6sZ6Saj8sAAIEsqAppnXybXYWmThnayiF2qw//CM+LDA1sMRt+VNYQviswiY otcyxOU77qK+zZvBzJ/iM1oqpMIs6iNvTccocQGpwn8GLdNeEVHHH27m1M28uZW6E4/j Zp66mas5YfC3g8L+sgRbFkgLUxmELU3IyVg18XBKxMjFMUqYlzMdNJySOoeldWo2p6ir igCuLRXAzOk58qKZDWOpnEgH2vywDPr0KeZMjaAu1Qf22h1+bV1J11hSgJJwnUR9oBXD GTJg== X-Gm-Message-State: APjAAAXwS5ePPA5Bx6WB8hdOUmwdW3+9wKJ2I3KZ5j/yAgveHWHTokTG sZcbRBN14KRy4n4qIdS2IXpEUhMRcJPhlQ8L5N4= X-Google-Smtp-Source: APXvYqwo7+B6TrVVAve5geMbxwWKld57RQ2bCpFkRZInhyn7JDme+q1gCCdMi5XP87PnWVG1WhzRC6T1oFERIKAj22A= X-Received: by 2002:a02:a595:: with SMTP id b21mr3597818jam.28.1566986865239; Wed, 28 Aug 2019 03:07:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 28 Aug 2019 12:07:19 +0200 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000786c0605912a8f74" Subject: Re: [PHP-DEV] [RFC] Reclassifying engine warnings From: kjarli@gmail.com (Lynn) --000000000000786c0605912a8f74 Content-Type: text/plain; charset="UTF-8" Hi Nikita, This RFC makes me very happy! I have a few points that I didn't find clarification on in the RFC. For "Undefined variable: %s" the new proposal is an Error Exception. For a starter: will it include dynamically declared variables such as $$foo? For my second point: in regards of backwards compatibility, is it possible to first trigger a deprecation for each of the cases that will abort the flow? If not, I fear I won't be able to upgrade as we still maintain a lot of legacy code that deals with dynamically declared and undefined variables, and possibly other violations that we don't know of. We are working on rewriting all this code but don't have enough developers to rewrite everything under a few years. If we can start logging these deprecations, we know where to fix what, rather than having our entire application crash. This way we can prioritize our maintenance on fixes each of these cases. The scenarios where this occurs often in our code base are dynamically included files that may or may not set a variable. The code is most likely "broken", but the behavior it produces is what's considered correct at this point. It can be solved by defining the variable with null value, but it's hard to trace without logging as we can't always set it with null value. Regards, Lynn van der Berg On Wed, Aug 28, 2019 at 11:33 AM Nikita Popov wrote: > Hi internals, > > I think it's time to take a look at our existing warnings & notices in the > engine, and think about whether their current classification is still > appropriate. Error conditions like "undefined variable" only generating a > notice is really quite mind-boggling. > > I've prepared an RFC with some suggested classifications, though there's > room for bikeshedding here... > > https://wiki.php.net/rfc/engine_warnings > > Regards, > Nikita > --000000000000786c0605912a8f74--