Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106718 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 45978 invoked from network); 28 Aug 2019 13:56:02 -0000 Received: from unknown (HELO mail-io1-f46.google.com) (209.85.166.46) by pb1.pair.com with SMTP; 28 Aug 2019 13:56:02 -0000 Received: by mail-io1-f46.google.com with SMTP id z3so5189662iog.0 for ; Wed, 28 Aug 2019 04:28:10 -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; bh=nBwW2WHvZbu07oFBC98Tbm2IA0YTjcXs5rT9FFHOKkc=; b=ZjVtJ1V5E1n22JFrvE1uzJN0T7b6dcEd+u7FpalKvXc/CmuG3T6DCxR8f1zmv9zqXW 5ZtBwkbyjM504T5xdapjwA4L8/4yJVtf4D0duM0Qu+fp0C6u5sNfenOjnsTPUa7H5jaN t45RXzhvPRCeUrxZszj0AXX9eFqxvrU8LS6uFtohVXdeRXtd8QvXbUBR9dVtyNzr77vu mdB946V8halJsmNMMGYzy++efm+JKqBwWPdAN2V0hcu78dAOatN5av+uZNx9i8JGymOn kb2WaRZ/kX+rZY2TiJzMqw/y7Za4FIGTxr0JR2HSe6rxbv4yiN2XYOrQWLb8/bhzU+uj 0Yqg== 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; bh=nBwW2WHvZbu07oFBC98Tbm2IA0YTjcXs5rT9FFHOKkc=; b=r/AmC0txUBlo0z61dw/Cs+tcjs9tEP1xt0ja1f3+n+drbPNgleFm3tk0mqOM0LU5hi klF9Vf5CPheHLo0OhGQIqKAb9sHj7CfNA6t0aqsa2fsJAf93/zOTnUZ5BH5DVeaz/a+j /jcSG6K/VXCw+nqBa11o3GiRS1NjLkkHRDnqCy8+kPpF/ixvfZIN46ekvAYvdu2V805n Q8UPlIu/ZXB6ssRFMLq5NeFDkzn7MQEvs3oalItdNwoxNSg2pCcPEm05BH1wjEKC5vUx nPDL0miXbrt2F2Shbq9aOoh5mLpZnT6OvCGxKPIpm5kpvo6Tt9LoP5m6fqi7MNTWpMgv PpkQ== X-Gm-Message-State: APjAAAX2klN0UIT+2aPhFfelzDQUFtqI3wuMAy2aq6lgsNclDSk1g/Yj hAwYkcwWEPfGQybxt2Nmemh6U15siRNaIbgjMVUvShcw X-Google-Smtp-Source: APXvYqzkDfvDo33j9dOuUXiMUnSRlV6JLEpSt0U7vKwUsNMyrurJNgxBfYlPNxXSrOAII2Av7riITkuV0KmmCqDiVSk= X-Received: by 2002:a6b:bf87:: with SMTP id p129mr3329967iof.253.1566991689602; Wed, 28 Aug 2019 04:28:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 28 Aug 2019 12:27:58 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000066b1f05912baf2d" Subject: Re: [PHP-DEV] [RFC] Reclassifying engine warnings From: rowan.collins@gmail.com (Rowan Tommins) --000000000000066b1f05912baf2d Content-Type: text/plain; charset="UTF-8" On Wed, 28 Aug 2019 at 10:33, Nikita Popov wrote: > 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. > While I agree with the reasoning behind this, I think we should be very, very careful of promoting anything beyond Warning. While it's certainly true that bugs may be hiding behind Notices and Warnings, it's equally certain that there is code that is poorly written but has entirely correct behaviour; for such code, the cure will be worse than the disease, because an unhandled Error is like suddenly pulling the plug out of the server in the middle of a transaction. That's why I was very careful with my undefined constant RFC [1] to first raise the Notice to a Warning, and leave an appropriate period before raising to Error. I would be 100% behind raising undefined variable from Notice to Warning, but think the impact of raising to Error is high enough that it would risk delaying take-up of PHP 8. Is it too late to raise to Warning in 7.4, with a clear message that it will be an error in 8.0? That would give time for people to discover it in rare code paths, get changes pushed to third-party libraries, etc, before it becomes an unavoidable error. [1] https://wiki.php.net/rfc/deprecate-bareword-strings -- Rowan Collins [IMSoP] --000000000000066b1f05912baf2d--