Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122233 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44387 invoked from network); 23 Jan 2024 16:37:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jan 2024 16:37:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1706027897; bh=3SV4kWe3IjVNa7v0YHruiI7xT3xJtxNS8i3x1XU5yy8=; h=In-Reply-To:References:Date:From:To:Subject:From; b=MpRfjEIaca5KHgBUJ5oWjuVBljUMJVpwWyXWu8VYpJLLw2wfKeYim2IOkbFBOqvaT RHUCldTEK+bpjEOKc9GE2mPgHeOBB6u8TBfk/8qQ6kLCYDmc5EzL8zbZz0M0gcgulE KFsbIbFEc4F7SRrFM7bvGCgLF7HvQzptuuafWLmQwRPAIvFjMP97995OH60LnKWwS6 Y387aBzBadOhfGEeMhiE5RCLy1zYIDBfuYDNaBOWviC3KvQMbUE7WhWxQOsuauIDe7 UCuXTTEYUdRy1ihVQEjrHImqY3tr5y8SqnhyW3giyQAf1SJpF3k5GHocmdyesTD3dZ GdJpmkPM7sl7w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 73AE3180051 for ; Tue, 23 Jan 2024 08:38:16 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-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,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 23 Jan 2024 08:38:15 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 18A565C00F7 for ; Tue, 23 Jan 2024 11:37:31 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Tue, 23 Jan 2024 11:37:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1706027851; x= 1706114251; bh=tl8xsDF9E2NouFfbU+9SNNtjyCCfMKs1OyEee5Qq4lE=; b=V 1vB6ZB4OnwBGrIlOcqiOpxcknX4c6Yvs95PIKsLaDVvYpTY9iinZxykyt6kARtGV uNdxX5ZH2anw7q/JNr8qYqEo6b53ofGQuY0eVpzwXbjsi8MdCAfLWAts0Z2glkhJ e4uN6NEHA+Eo7behWDBtGFZBTpBuuHhBWPUTrbo7wXiDOjf7w9bYH/F6rlv0T3G7 fQ1pguZh6Mnooc+zSpVrtiRv9/NFjM5OrwcoqfheszEn4bCaHF4LsrCIG7PUMTHu dMIl/SmjFjnun8/Wyw/TEQA+Iy24WJKKdy9qVZDq7GPFPeVwHq56iXozCDEQFnwn zUsDjQR+nmYxnbG/cFQEw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706027851; x=1706114251; bh=tl8xsDF9E2NouFfbU+9SNNtjyCCf MKs1OyEee5Qq4lE=; b=bNhBduV/sUVmThpJ329tOu1Zf740NQ0q2aNq0XeV3YbN TfSaIWtmpoOl0PHl+s9s7GdF0eC1rHLqo+4yNmK5dqBWtPnoWaWpVgG+c4hdMGiB sZaV7/5+5zvEy6FJL90BcmG+q6MJsxLi5//MgHTclbiq6g9yWI0IVFnq79N2Fz6J l6F1Pt3+x73ET6rYekX3Nu5200HqYVbJGWcDpgS5acPeZ8E5qJT4OOU/3nGbKGeh SB+iv6gSSfxYuvdij33sw7NHs4dglMQ4yC/RMMpuLhxqyzy/+dDwGlC7Yjr2qZtL uBBpHmupduEJ5dK/4+4w6tOe/sRSZ+wv0MXHZYZ/GQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekkedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeejvedvfeethfdutdekudevgedtiedvfeehfeehueek ieekhfduieelgeetjefgtdenucffohhmrghinhepvdeguggrhihsihhnuggvtggvmhgsvg hrrdhnvghtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B1A1B1700096; Tue, 23 Jan 2024 11:37:30 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-119-ga8b98d1bd8-fm-20240108.001-ga8b98d1b MIME-Version: 1.0 Message-ID: <3cbdc9bc-1d66-40b9-bc48-0506ba5e1977@app.fastmail.com> In-Reply-To: References: <344c3e06-3822-4b20-9a6f-a58fb64929a7@app.fastmail.com> Date: Tue, 23 Jan 2024 16:37:10 +0000 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] Deprecate implicitly nullable parameter type From: larry@garfieldtech.com ("Larry Garfield") On Tue, Jan 23, 2024, at 2:18 AM, Gina P. Banyard wrote: > On Monday, 22 January 2024 at 18:53, Larry Garfield > wrote: >> I am in support of this change. My only concern is timeline. This RFC would deprecate it in 8.4, and presumably support would be removed in 9.0. While we haven't discussed a timeline for 9.0, historically the pattern is every 5 years, which would put 9.0 after 8.4, which means only one year of deprecation notices for this change. > > There is no reason as to why 9.0 should come after 8.4, and I > fundamentally disagree with the logic that we somehow need to "plan" > deprecations around how much time we need to provide users to upgrade. > To this day, I have never been provided any evidence that longer > deprecation times actually lead to users upgrading their code sooner > and not delay the inevitable. > We were even told to shunt mass deprecation RFCs for 8.0 to 8.1, > effectively reducing how much time users have to upgrade for the sake > of simplifying the migration from 7.4 to 8.0. > > The idea for this RFC was floated around the time of PHP ***7***.4, but > this was deemed too soon due to cross version compatibility. > > Moreover, asking core developers to magically figure out all the > various ways PHP is bonkers or broken in a specific narrow time frame, > just so userland can have X version where the deprecation exists until > removal, is unreasonable. > If this is the model that we should seek, then we should *completely* > move away from our current versioning system and do something more like > Python that provides 2 version where a feature is deprecated before > removing support. > E.g. features deprecated in Python 3.9 were removed in Python 3.11. > > As such, I will not entertain this idea of timelines and when it is the > "right time" to deprecate something for it to be removed at the "right > time". > > If this is something people feel strongly, an RFC to change what our > versioning is and means should be done instead. > >> Given the massive amount of code that built up between 5.1 and 7.1, and 7.1 and today, I worry that a year won't be enough time for legacy code to clean up and it would be another "OMG you broke everything you evil Internals !" like the "undefined is now warning" changes in 8.0. (In both cases, well-written code any time from the past decade has no issue but well-written code is seemingly the minority.) > > I find this comparison disingenuous, fixing undefined variables is one, > if not two orders of magnitude harder than fixing this issue. > Fixing implicit null to scalar types coercions for internal functions > causes way more havoc than this for legacy codebases, and yet we have > consistently maintained the rationale for the deprecation. > > While I do take into consideration the impact RFCs can have on existing > code bases, I consider having clear, easy, and comprehensible semantics > to be way more important than supporting some complicated and confusing > semantics for the sake of BC. > There will always be code running on a completely outdated version of > PHP due to whatever reason. > And refusing to fix the language and its semantics for the vast > majority of new code that is going to be written in it feels like a bad > decision to me. > Especially if fixing it results in engine simplifications. > > We are our own project, and we need to make choices for the sake of the > health of the project, and this means removing stuff in a reasonable > timeline. > I personally don't work on PHP to do legacy maintenance and keep > running it at all cost, if I did want to do this I'd be writing COBOL. > I work on PHP because I believe it has a long future ahead of itself, > and that new people will learn it and use it. > And forcing those people to need to learn, and remember bazillions of > gotchas really doesn't sound fair to them IMHO. ... I think you're grossly misreading my post. I reiterate: I *support* this change. I like it. I want it to happen. I am not proposing that we support broken old code indefinitely, nor have I ever done so. But, > I fundamentally disagree with the logic that we somehow need to "plan" > deprecations around how much time we need to provide users to upgrade. I categorically disagree here. PHP has a terrible reputation, even among its own boosters, for breaking people's stuff and making upgrades harder. That is partially deserved, partially not. (I've written in defense of Internals' improvements extensively.) But as a project we need to consider both the practical and social impact of any breaking changes. You assert that this is 1-2 orders of magnitude less impactful than undefined vars or null string params were. I have no data on that off hand either way, so cannot confirm or deny that estimate. (If you do, that would be very helpful. No sarcasm, it really would.) It is definitely more tooling-handleable, and it sounds like there's ample existing tooling for it, so that's great and will help, but as we've noted many times, people using good tooling are the minority. Even if this change is vastly smaller than previous flashpoints, my concern is it being large *enough* that it causes another rukus and more bad PR about "oh those PHP devs breaking everyone's code without any regard for we peons." (cf: https://24daysindecember.net/2022/12/06/evolving-php/) Whether or not that statement is true is irrelevant. If that is the perception, it does harm to the PHP ecosystem. Will this change be large "enough" to cause a fuss? I don't know. I fear it may be, but I don't know. That's a worthwhile conversation to have, calmly. But a longer deprecation period can help to reduce the fuss. (Not eliminate, but that's not something we can expect. Reduce is enough.) There is indeed a related discussion around scheduling, deprecation timelines in general, etc. As I said, I've tried to start that discussion in the past and was mostly ignored. Maybe "all deprecations last for X releases, whatever the number" is a good policy to have; I don't know. Deciding now that there will be an 8.5 and then a 9.0 is also a viable option, which will also give 2 years grace period for users to get up to speed on this change. That's the entire point of deprecations. What I do not think is a good approach is "meh, we'll deprecate whenever, and remove whenever, we'll tell you when we get there." That's not helpful to our downstream users, without whom there is no project. PHP is at a scale where we have to think about such things. Because every time we give someone a months long upgrade process, users migrate to Go, Node, etc. We *do* need to clean up PHP's screwy edge cases, and I'm very glad that you've been working on that for so long. But we also need to better manage that process to minimize the pain for downstream users, or we won't have downstream users. Flippancy about them is counter-productive. --Larry Garfield