Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119129 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 89313 invoked from network); 13 Dec 2022 16:29:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Dec 2022 16:29:38 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 957A4180547 for ; Tue, 13 Dec 2022 08:29:37 -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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 13 Dec 2022 08:29:37 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 84B655C0081 for ; Tue, 13 Dec 2022 11:29:36 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Tue, 13 Dec 2022 11:29:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1670948976; x= 1671035376; bh=5qXSatdLetMmJomwbOpyuKDRAaN47i1wEWf89SxeuB0=; b=M YZQTdqLWL6UNFBFpbrjMXCRj2mAKfBdzgF79+7olWVOKKyMy/oM/bGFnF+AaAEm+ FPLVg0QuXUnnqC/XY+OAY1hGIoQPdwNkf6j85nrcHYwY0eAc6GuHPTdyE0F6fds0 nwL1OBec91qt5xvArpYQSHj64iXBF7Cif7XOoAaxdyoheCCQc/Bam1jc9H5TO6cb enoLvfGLTRN1pQWuzpGe+KvUKQbDGzzZZMYG6/vdhEaPG1ANZD/JLB0j29cnt4as 3Ts+L2jGaEMld6HVkMpVutLRmV85RN3XNwAB+5bOMESCiMEBZZOII5zZzRphJcr1 X+odrmvv8qpjOSV/BbGUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1670948976; x=1671035376; bh=5qXSatdLetMmJomwbOpyuKDRAaN4 7i1wEWf89SxeuB0=; b=ZlG0v1jZ2cFdjX8UAHR6nptkC5iIhqutedLyGO3GUK3+ chv3Q4ojeDl10y8D3o7jp8oV14U3w3HkXvlAHDIiZAzsokmQY1Vz+de1Ptpeg+N1 C3e1Ek0HDtHhoPQ/ygU/FiGBJTFbq/ifTuxivSZc6J67hKxzf6I4VRry849kKV+l KjNlHrZqXZIZTGKzuk39bqNho6qdk+PRIxuOO0/n19fz89nQbX5JFvETwDqWkEaF svSBh+cAxIONLLReVv4wu9l5ixpJ7hlsx0PyG6Bm80bVhnGRcY5ABQu8WOruqDiR c31QAbjVCWRXHS0b0TSt5dIfx/RYLa40wvVEbkp7Xg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedugddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgrrhhr hicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh eqnecuggftrfgrthhtvghrnhepteetvdfhgffffeeihfejhfdtgedtffehuddtvdfhgffh ueetgedthedvgeevhffhnecuffhomhgrihhnpehusghunhhtuhdrtghomhenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghr fhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 33FAC1700093; Tue, 13 Dec 2022 11:29:36 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead Mime-Version: 1.0 Message-ID: <64f13dbe-ffa7-4575-b5b3-e30df3791b9c@app.fastmail.com> In-Reply-To: <64f90d2c-a939-2a21-acae-f7115ed991b2@cubiclesoft.com> References: <5fe0d8a9-d305-9c9d-ca36-1ca30de87b78@cubiclesoft.com> <64f90d2c-a939-2a21-acae-f7115ed991b2@cubiclesoft.com> Date: Tue, 13 Dec 2022 10:29:15 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index From: larry@garfieldtech.com ("Larry Garfield") On Tue, Dec 13, 2022, at 9:55 AM, Thomas Hruska wrote: > On 12/13/2022 7:15 AM, Derick Rethans wrote: >> On Mon, 12 Dec 2022, Thomas Hruska wrote: >> >>> On 12/12/2022 3:52 PM, Derick Rethans wrote: >>>> 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. Given >>>>> that: >>>>> >>>>> - PHP has been treating this as an E_NOTICE for over 20 years >>>> >>>> But not in the last three years. >>> >> >> >>> The type of post that the OP sent to internals is likely to become >>> more common in the next few months as PHP 8.x starts rolling out >>> globally. >> >> PHP 8 has been rolling out for two years "globally" already. >> >> cheers, >> Derick > > Not for those of us that run the package managed version of PHP in > Ubuntu Server LTS it hasn't. > > https://wiki.ubuntu.com/Releases > > PHP 8.x is brand new as of *next year* from the perspective of those who > patiently wait for certain OS level updates because overall system > stability is important for critical production servers. The x.x.2 for > the Ubuntu LTS series tends to be sufficiently stable for most > environments but 22.04.2 hasn't been released yet. Hence my earlier > comment. Lagging behind on distro LTS releases for production is one thing. But if the dev team and/or their managers aren't even *looking* at PHP 8 for 2 years, and then getting shocked at *deprecations* or known-bad-practices like undefined vars becoming a louder message, that's entirely on them. Developing under E_ALL has been the recommendation for... 15 years? 20 years? If someone has been doing that at any point since George W. Bush's first term, the undefined vars error messages would have long-since been fixed and 8.0 would be a cakewalk. Anyone surprised by any of the changes in recent versions that boil down to "know your types and know if you actually have a variable" has been living under a rock for the last 20 years. None of this has been a secret. The language has been providing more and more tools to know-your-types for years. And yes, I used to work on a system that didn't do that properly. (TYPO3, ~800,000 LOC) It took me a few weeks, but we still managed to fix all of these issues in mostly one-person-month, mostly with dropping "?? null" around in various places. It's not the world-destroyer people make it out to be. --Larry Garfield