Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116435 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76771 invoked from network); 17 Nov 2021 03:40:37 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Nov 2021 03:40:37 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C02601804F2 for ; Tue, 16 Nov 2021 20:35:43 -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=-0.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 ; Tue, 16 Nov 2021 20:35:40 -0800 (PST) Received: by mail-wm1-f44.google.com with SMTP id 77-20020a1c0450000000b0033123de3425so3722636wme.0 for ; Tue, 16 Nov 2021 20:35:40 -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=A9Kpwsmu4Z7UO1cF3Wn4GCxqLoeMl/9eHr5lFVWsmho=; b=eD8C66T+LjgtTdm4F7wUmparppGArAb3ZbqPgRb4AXvTywhJEM2b2XsO0fl2AOU5PN HAmYfTET25TV7mDacoun+hMF5Nih+MwMUf+e9BBfRfDJHdG0HlVbsYKx5+WZ/j2VHC7I d1TungnwYxOsYCVBm9P3meJG1Y82ZVRMuGAHUW3YngDCSQPxFahQuIsoE/667IIYjcQH psZr/L1LwZ6tO400M/qNtPca5XQtDWWFlf7LtDdJ9byL18YzNmcXYkhA+Rgi/lejE8xZ KwfO3kRWdxyeozwXl/NpHwAWt3/1Vwdmt6GDlDq/EztTuixuAF11qdRjDNTa2zIvHPjy cx+w== 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=A9Kpwsmu4Z7UO1cF3Wn4GCxqLoeMl/9eHr5lFVWsmho=; b=hd6D3wLhIa33nEj3yySX6fSTLD31r8dtFtmqZvxZ2uz7t+x857pz/2l+2Ruesnf37H 4ZbCUj97ohVvlrkAnBARElynGWRP2xM6JrhpcpoXonIc6+pBNi/HRv6BOEbn8ZVZxcJm LJf0Jbsd7Fk45qPy/ZzhJuqRROAuRsHO8p4jq3l3If+4/JGz0IAAEi3SoQ8MI0szE/tq jtodmvLII3Qq0ax9V+kHwp754kDAHxOEWaKZHHfq0vkH8on0tbfRXAfmwpDXePGxNbU1 nS35RSA1N9z4yLjHZt8C+67pbIVAmBqr/hhu0vEsgXjyhu9tt2A07EPJyDouGRi3hT2R 9k4A== X-Gm-Message-State: AOAM531c39z8MkcDmwMMZJ4cFbhOqoDvXqYfbDFWDw9xJqWSlODUoaiO tz7CfzOY2NWQcc3C1y9R289UhZCQClzwikj/YQ== X-Google-Smtp-Source: ABdhPJz/vs1ittNCb2wfID6w5DcgOl2GMeLIppevQtxvdAVa/Js9su/YG1PiQQRYARMb2usaQxWh8qCtpi8QVoJAiOo= X-Received: by 2002:a1c:9851:: with SMTP id a78mr74824052wme.116.1637123739003; Tue, 16 Nov 2021 20:35:39 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 16 Nov 2021 20:35:25 -0800 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [VOTE] Deprecate dynamic properties From: paul.crovella@gmail.com (Paul Crovella) On Fri, Nov 12, 2021 at 5:08 AM 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. > > Regards, > Nikita In the Motivation section when talking about static analysis the RFC makes the claim: > The #[AllowDynamicProperties] attribute proposed in this RFC makes the cases where dynamic properties are used intentionally explicit. however this really isn't true as the attribute is on the class rather than the use. Static analysis will still have no idea whether any dynamic property assignment is indeed a bug or intentional. The information added is only whether the author of the class has deemed it okay for dynamic properties to be used on it, not by it. The class author and the dynamic property user might not be the same person or have any relation. The class being intentionally used with dynamic properties is not necessarily in the user's control. Similarly the class being unintentionally used with dynamic properties may not be either. This user/used mismatch is repeated in the RFC, for example: > Classes marked with #[AllowDynamicProperties] as well as their children can continue using dynamic properties without deprecation or removal. These classes cannot then use dynamic properties, they can have dynamic properties used on them. The inaccurate prevention claim is repeated as well: > #[AllowDynamicProperties] requires making classes that rely on dynamic properties explicit and prevents accidental use of dynamic properties It may help prevent some, but others can skate through on happenstance. Cheers, Paul