Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116333 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 56943 invoked from network); 12 Nov 2021 17:00:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Nov 2021 17:00:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9426618053C for ; Fri, 12 Nov 2021 09:54:07 -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=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FREEMAIL_REPLY, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (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:54:04 -0800 (PST) Received: by mail-io1-f41.google.com with SMTP id e144so12210297iof.3 for ; Fri, 12 Nov 2021 09:54:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dneiNhpiKPUP9rpFHA8+MBHZdU5ZxUfsX44RBGW23cY=; b=RFIdefqih+N7mCiWJp2pAA5Z9CNDl/vu7ukQ1D1pTmb6fkggFtA1L/VyI87zVnmMZo aXiKwOPRBO3sg5w8HdQAyzoWQMn7KrklQuChElQ2obigwYQTimPwoZbVH9W7By628hJu 0VJX7irLfMcdsqxvDKVxmrrslRefaAUmXRFhALB4jvMtam3Hiq/N2nojYqnGloOc8cYU CNqhOKe1lMs6hs5M2P34W0mPK9UsHV+yt1nZpszMQKr5bz5U0vIZnY5n+2LQH+XMHSt3 Wnm0JQFmf83UKU+ZV6PQJwjnyJvVPlfmZ10y0TBVjcXxBT8ZVds53v7ftgtv4JpCSA5S 0qAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dneiNhpiKPUP9rpFHA8+MBHZdU5ZxUfsX44RBGW23cY=; b=jMdCFkV6UPToueWh1JxORmN74zR2R7Evx+6nDQuw4lKPl7MmyOmA13S2IlfupW44JE 2e4GaCVhh34S1OwD3bjqSG4B27QmkND1rmhrVVRF61nfKogxCNA0bZQIFWXEgzcrm3vu QHsGKNNhpnjt68KiCW9+yamvMmUR7bCPwNtUXLfotxUJiYBMwnXTEICvwjPldPHT56NZ 1dh0OrY0crPTBu10C5BVyKzcKdxOBXePbEl26FkdW4O2Rt+Ue3xXFRfy+Ns0etv3kDjs HSdWLY0W5xMAv+tCN6S92+7/27hn06J9bj4uG5hcYi7tEgRE7c9IR4wMPxa9W4kY5TWa aCjg== X-Gm-Message-State: AOAM531g1Yg/TxProQyAtdPzJnQ1pXsIkKl0WWYT71XGzTued0dRIKx3 i3BdGz2amzsUtmUnNjbB/Jo3ab9FxaTliPW/CSGGV0kgl+yGgg== X-Google-Smtp-Source: ABdhPJwf6aELefHvg5BHmRpkD7utl9es4I1v4RFxZZrydkNzVuxhny96UiGbLTYZbSCKCExnrhTrJCuFu1Fe2PgJXrA= X-Received: by 2002:a05:6602:1686:: with SMTP id s6mr4166685iow.186.1636739643630; Fri, 12 Nov 2021 09:54:03 -0800 (PST) MIME-Version: 1.0 References: <0A40B090-43E3-484F-B67F-175C3B8F7CD6@php.net> In-Reply-To: Date: Fri, 12 Nov 2021 18:53:28 +0100 Message-ID: To: Chase Peeler Cc: Larry Garfield , php internals Content-Type: multipart/alternative; boundary="0000000000000c686305d09b25d7" Subject: Re: [PHP-DEV] [VOTE] Deprecate dynamic properties From: deleugyn@gmail.com (Deleu) --0000000000000c686305d09b25d7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Nov 12, 2021 at 6:47 PM Chase Peeler wrote: > On Fri, Nov 12, 2021 at 12:44 PM Larry Garfield > wrote: > > > On Fri, Nov 12, 2021, at 10:56 AM, Nikita Popov wrote: > > > On Fri, Nov 12, 2021 at 5:34 PM Nikita Popov > > wrote: > > > > > >> 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 < > nikita.ppv@gmail.com > > > > > >>> 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 larg= e > BC > > >>> break for, and it should wait until the last in the 8.x series befo= re > > 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 depr= ecated 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 > > issue > > >> 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 tha= n > to > > >> 8.4, which would be directly before a major version with limited tim= e > to > > >> act. Now, we don't usually tend to optimize for "time of deprecation= " > > >> because that requires planning deprecations many years in advance, b= ut > > if > > >> the choice existed I'd always go for deprecating early in the major > > release > > >> cycle, rather than late. > > >> > > > > > > Another thing I want to add here is that in this instance, I think th= at > > the > > > deprecation warning is really helpful for updating your code. It tell= s > > you > > > exactly which property on which class is being created dynamically, s= o > > 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 > > course, > > > 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 > > properties > > > 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 > running > > with deprecations on in production is doing it wrong and will get bitte= n > > 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 them, > > that's... a different problem that cannot be solved by not issuing > > deprecations. > > > > --Larry Garfield > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: https://www.php.net/unsub.php > > > > > I don't think this should be deprecated or removed at all. However, I agr= ee > that if it is going to be removed, the more time/versions that exists > between deprecation and removal, the better. > -- > Chase Peeler > chasepeeler@gmail.com > I agree with previous replies and would even go as further to say that it is better to try and avoid deprecation on the last version of a PHP Series. I like this deprecation, but I also think it's a pretty big deprecation to happen only 1 year before it's actual removal. Deprecating it now means people will have at least 3 years to adjust to it. Recently Laravel also made the same changes that PHPUnit did to stop converting deprecations into fatal errors so that users can still use deprecated code if they need more time to accommodate. --=20 Marco Aur=C3=A9lio Deleu --0000000000000c686305d09b25d7--