Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116331 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 54103 invoked from network); 12 Nov 2021 16:50:13 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Nov 2021 16:50:13 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 332581804B5 for ; Fri, 12 Nov 2021 09:44:13 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE 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 out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 12 Nov 2021 09:44:12 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E38AC5C261C for ; Fri, 12 Nov 2021 12:44:11 -0500 (EST) Received: from imap43 ([10.202.2.93]) by compute6.internal (MEProxy); Fri, 12 Nov 2021 12:44:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=goiuXcIbDoORNv6wBuGSlvwhFt5xf47hE/fwaYqlV Uk=; b=mT4enxhhHWDrOk0nsG9ggKyd4Kfxz3+xHsrU+j+Nv7m0cPSCnnsvlsH9D U9wWFa4oCg4k8Nh7vh1XnHK03xKGcKZDFT9S62SghUhFJ9O5c2kl3U0YIT8m3+z/ hnF/QtbDx/HlA1gNcae0/LOE9XAN+/qEk1VogEEmFlx1zYUpNby2XdL/m+973u4A WIRxD0u1F4x+ZvzcuR5M+Oqut3ozgE1HqY/B+pQDGnYUJLoW5mdFqd7IFNRsYLKw NrR+IGq9O2za15kQZL2DNS04aYlRQyHR3yQmv2eJLFXx1wI3c74CNOqiH+2+6YMd gsmfKGKRq9nxICnsRfydVNwBzhFVw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrvdefgddutddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepgeeghefgteejheeggfeghfelueeggfdtjeeivedv tefhveeguedufeelhedvteeinecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhf ihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id BBCEBAC0DD1; Fri, 12 Nov 2021 12:44:11 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1371-g2296cc3491-fm-20211109.003-g2296cc34 Mime-Version: 1.0 Message-ID: In-Reply-To: References: <0A40B090-43E3-484F-B67F-175C3B8F7CD6@php.net> Date: Fri, 12 Nov 2021 11:43:49 -0600 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [VOTE] Deprecate dynamic properties From: larry@garfieldtech.com ("Larry Garfield") On Fri, Nov 12, 2021, at 10:56 AM, Nikita Popov wrote: > On Fri, Nov 12, 2021 at 5:34 PM Nikita Popov wr= ote: > >> On Fri, Nov 12, 2021 at 5:25 PM Ben Ramsey wrote: >> >>> > On Nov 12, 2021, at 10:10, Derick Rethans wrote: >>> > >>> > On 12 November 2021 13:07:42 GMT, Nikita Popov >>> wrote: >>> >> Hi internals, >>> >> >>> >> I've opened the vote on >>> >> https://wiki.php.net/rfc/deprecate_dynamic_properties. Voting will >>> close >>> >> 2021-11-26. >>> > >>> > I've voted no on this one. Not because I don't like the idea, but >>> because I think the timeline for deprecation and removal is way too = fast. >>> > >>> > This is IMO not something important enough to cause a fairly large= BC >>> break for, and it should wait until the last in the 8.x series befor= e we >>> deprecate it. >>> > >>> > cheers >>> > Derick >>> >>> >>> I=E2=80=99ve voted no for the same reason. >>> >>> I like this change, but the deprecation in 8.2 seems too disruptive.= I=E2=80=99d >>> rather promote our intent to deprecate this with a statement in the >>> manual that says something like, =E2=80=9CThis feature will be depre= cated in >>> PHP 8.3 and removed in 9.0.=E2=80=9D >> >> >> FWIW I think we should always deprecate things as soon as possible, to >> give people the maximum amount of awareness and time to address the i= ssue >> before the actual removal occurs. Most people will not be aware they = need >> to take action if it's just a note in the manual. For that reason, I = find >> it generally preferable to deprecate something closer to PHP 8.0 than= to >> 8.4, which would be directly before a major version with limited time= to >> act. Now, we don't usually tend to optimize for "time of deprecation" >> because that requires planning deprecations many years in advance, bu= t if >> the choice existed I'd always go for deprecating early in the major r= elease >> cycle, rather than late. >> > > Another thing I want to add here is that in this instance, I think tha= t the > deprecation warning is really helpful for updating your code. It tells= you > exactly which property on which class is being created dynamically, so= you > can quickly go through these and add missing property declarations or > #[AllowDynamicProperties] attributes. Without the deprecation warning = in > place, you need a static analyzer to find problematic cases. And of co= urse, > that only works well if you already have a fully typed code base that = is > reasonably clean under static analysis. At the same time, this change = is > most likely to affect projects where this is not the case. If you are > already using a static analyzer, you probably don't use dynamic proper= ties > anyway, as these things tend to be incompatible. > > Regards, > Nikita Also a reminder that deprecations are not errors; PHPUnit very recently = changed to not complain about deprecations by default. And anyone runni= ng with deprecations on in production is doing it wrong and will get bit= ten whenever the deprecation is enabled. I have to agree with Nikita here. Give people as much deprecation time = as possible; if people are misunderstanding deprecations and abusing the= m, that's... a different problem that cannot be solved by not issuing de= precations. --Larry Garfield