Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119110 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 831 invoked from network); 12 Dec 2022 22:53:01 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Dec 2022 22:53:01 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9E18518053F for ; Mon, 12 Dec 2022 14:53:00 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_40,SPF_HELO_PASS, SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS30827 82.113.144.0/20 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Mon, 12 Dec 2022 14:53:00 -0800 (PST) Received: from [127.0.0.1] (unknown [85.255.232.166]) by xdebug.org (Postfix) with ESMTPSA id F38C710C02C; Mon, 12 Dec 2022 22:52:58 +0000 (GMT) Date: Mon, 12 Dec 2022 22:52:56 +0000 To: internals@lists.php.net, Dan Liebner User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: =?US-ASCII?Q?Re=3A_=5BPHP-DEV=5D_Revisiting_RFC=3A_Engin?= =?US-ASCII?Q?e_Warnings_--_Undefined_array_index?= From: derick@php.net (Derick Rethans) On 12 December 2022 22:20:27 GMT, Dan Liebner wrote: >It has been proposed to make the error level of "Undefined index" >configurable so that teams and individual developers can decide for >themselves how they want this situation to be handled=2E Given that: > > - PHP has been treating this as an E_NOTICE for over 20 years But not in the last three years=2E=20 > - the change is a breaking change affecting many large codebases > ubiquitously (unless one were to unadvisedly suppress E_WARNING errors= ) No, code doesn't break=2E It now shows a warning instead of an error=2E Th= ere is no behavioural change=2E=20 > - 7=2E4 is now deprecated Yes, as each release does 2+1 years=2E Which also means you've had 3 years= to address this in your code base(s) already=2E=20 >I think making the error level of "Undefined index" configurable is a ver= y >reasonable suggestion, and I support it=2E Adding a configuration setting to make this a notice on some installations= and not on others, would just mean that anything that needs to be able to = run everywhere needs to take care to not rely on the setting either way, ma= king it harder to develop portable code=2E=20 We're also not generally anything near keen on adding settings that change= behaviour , and suggesting to add one to make a warning a notice seems ver= y far short of a bar that needs to be reached before many of us would agree= to add a setting to make PHP less portable=2E=20 Alternatively you can just fix your code=2E=20 >Are we able to revisit this topic as a community and potentially bring in >more PHP developers from around the world to weigh in? You're always free to follow the RFC process, but I think you'll just up w= asting your, and everybody else's, time with it=2E=20 I can't see this being reversed, nor a setting added for, through an RFC p= rocess=2E=20 cheers=20 Derick=20