Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116330 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50894 invoked from network); 12 Nov 2021 16:02:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Nov 2021 16:02:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E44FD1804C4 for ; Fri, 12 Nov 2021 08:56:39 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (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 08:56:39 -0800 (PST) Received: by mail-ed1-f54.google.com with SMTP id g14so40231526edz.2 for ; Fri, 12 Nov 2021 08:56:39 -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=pn7CFxce6puDkUlszqDEEQaG18dDEwyGbDjw8p9chuU=; b=Ms1wFgqvmgmAvHC0ZPRbAT6JgSJK0kaCo6aeNqD8qGWpIiKs7trKwMVcnGNBcWGPJn CcOqp4VhzxAodnA8YqgI2MBjQdq9gj8sfS+OjaxUv1YmORNU5UR1yiPbhz7E6Dt3aa0S VxJ6G1XWiAF3QPjiAJn8Y5Llo8ssIenLdyt6F1t4+0Xx3gsiOsXWjeFnMkHSQwRidO7b qnuX9nmH73GhMEvWFwXqlhW632wPO6eHaoQ49NM9QZTk+LRifbmtremVTEo605VovCqd Wk9DHYZ04VwGyDW3YTkWqXWvmk1/xC5u8+IhXIa7W02Y52bwb+Gd2DaD32GBKDxvTyv+ /vhQ== 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=pn7CFxce6puDkUlszqDEEQaG18dDEwyGbDjw8p9chuU=; b=piQfOa4INEjYPOFCN1V0jXIMom5MzWsBxSdrA5LIry5kW3vT0hfl7E98YORfvGHskk 5qelYYlAEiWdfBCMcnA2/hh20IAl/G0oINiNSaJd1vzc0BYDz1YiHvgObAneC5NUii3q LccqCkbYXRrO8vxoJjmKonrUP9Q1X1W+ZLJtms3si1bLhvRtR/uHLLwzapjDguRPi9EK BLRYv4g97SLWoKjyoZmRFn2hXVeLEzG8K38ozQAwmgMegnnim8OLZErtynDEbzngPKZT HurpaIa86JzeszyetII8WWxbYIu2C+KKfrf078r3N8pSRfKUu8AYAg675szY1PFlFwFk BCKA== X-Gm-Message-State: AOAM530KjCWZ4NatuwRSEPdGaJUF5M58oTa0B1UeRyIgsPsDphAYGSMg 9SQ7BeD8H4L6l8V1ILgEPR9x0sJGCyi9sa6bGtJ34aGO X-Google-Smtp-Source: ABdhPJw1GZ2rRSRJfrSfBRqUXgBp6NbwZWsr4qFFAllY9sZJJBOI9R0sdPaZJ1RWZnjOpP0vKTHFfqk92M9neFJsTY4= X-Received: by 2002:a05:6402:278e:: with SMTP id b14mr23218534ede.362.1636736198243; Fri, 12 Nov 2021 08:56:38 -0800 (PST) MIME-Version: 1.0 References: <0A40B090-43E3-484F-B67F-175C3B8F7CD6@php.net> In-Reply-To: Date: Fri, 12 Nov 2021 17:56:22 +0100 Message-ID: To: Ben Ramsey Cc: php internals Content-Type: multipart/alternative; boundary="000000000000b00c5a05d09a5705" Subject: Re: [PHP-DEV] [VOTE] Deprecate dynamic properties From: nikita.ppv@gmail.com (Nikita Popov) --000000000000b00c5a05d09a5705 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 >> 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 before 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 deprecate= d 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 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, but if > the choice existed I'd always go for deprecating early in the major relea= se > cycle, rather than late. > Another thing I want to add here is that in this instance, I think that 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 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 --000000000000b00c5a05d09a5705--