Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115802 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 59201 invoked from network); 25 Aug 2021 10:11:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Aug 2021 10:11:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D92111804B3 for ; Wed, 25 Aug 2021 03:45:32 -0700 (PDT) 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.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, 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-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 ; Wed, 25 Aug 2021 03:45:32 -0700 (PDT) Received: by mail-wm1-f50.google.com with SMTP id i3so3877881wmq.3 for ; Wed, 25 Aug 2021 03:45:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=k7IWqs9cvIS8ZCZ4U3jGfBwAw1pkRdwXJMx++jEaJHk=; b=s6T3Nez0u1QiPDBqRzv5yD83Tsj2OWtwutWpvOK/G8jEluGfOH9uqOm0lCufMxWGM5 vFR5OOOGMY6lhupdrxNZaisiQ3/VUDipiv4R4VSCHOB8yEvp09j+K3mp2soQBeO+hG3t Lq4qP+ENuTj1d7XUHS9BRE4K5DU8hFMAx0X8up5KZHwjRJQo8JKKj8GCLLp4FGNFMAYi 2MVZRYjJLzQAwMVYvKEEV7fklFElDs/LC5A4eoDiAsjkSr1QjGbowInDO7JfRYQkZRNl PtW8Pk72lBem2KTPirlrbLn5GabayhJZvFJnF3//Z0iVckBbqJxSI3eWNU09zgvwywkE L0YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=k7IWqs9cvIS8ZCZ4U3jGfBwAw1pkRdwXJMx++jEaJHk=; b=oLHj6WZQ/0LveQKd+j82Fy2l3ogZbZKuxGBcwZBnsoWrG2PL8Ro5PgDHq9Em/UsuWS uwRY+RGGZweKDLRMi4NG9r11QXeudV7G+s0SAr5w7yZtNUgPQ3dd53r8kYb/OE5HGyob B2tgSI4Z5cA8gVuqO2ZJzcwqbxKaTzTm8U9I2bj0ZKYBn5qymM06zBsl/0zQHGcRGN1A L5EfmOHCvFc7M1bEDCl+EOTjnhvh3rWQZIHZqq6Rmu5oZQShzRiFgKof3RhXZekEI6VI llZHMoXk8MTAPMQE68cpDVc/tcQVS5+FM9rIk5vH9h1Wsn8T1t6elpnV756OMN1AoUK1 FLRw== X-Gm-Message-State: AOAM5300H99gbhmrtghiGCx35EkaztJERRxQ8jevZ21srw7UsCMEIYUw 3VDuaRwDfMW2xL9xexq91VHl0dErttw= X-Google-Smtp-Source: ABdhPJwA1AIZuthKlnnL6B9sWhlk5R00Xw6HfDwTzOcZ1ue42EDpEYUsWTxcvhNVh4T38gzUsmL4GA== X-Received: by 2002:a05:600c:4e8a:: with SMTP id f10mr8765497wmq.84.1629888328794; Wed, 25 Aug 2021 03:45:28 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id z5sm4775528wmi.36.2021.08.25.03.45.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Aug 2021 03:45:28 -0700 (PDT) To: internals@lists.php.net References: Message-ID: Date: Wed, 25 Aug 2021 11:45:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] [RFC] Deprecate dynamic properties From: rowan.collins@gmail.com (Rowan Tommins) On 25/08/2021 11:02, Nikita Popov wrote: > I'd like to propose the deprecation of "dynamic properties", that is > properties that have not been declared in the class (stdClass and > __get/__set excluded, of course): > > https://wiki.php.net/rfc/deprecate_dynamic_properties This is a bold move, and in principle seems sensible, although I'm slightly scared how many places will need fixing in legacy code bases. I have a couple of concerns with using stdClass as the opt-in mechanism: * The name of that class already leads to a lot of confusion about its purpose - it's not actually "standard" in any way, and new users seeing it as a base class are even more likely to mistake it as some kind of "universal ancestor". Would it be feasible to introduce an alias like "DynamicObject" which more clearly defines its role? * Adding a parent to an existing class isn't always possible, if it already inherits from something else. Perhaps the behaviour could also be available as a trait, which defined stub __get and __set methods, allowing for the replacement of the internal implementation as you've described? Regards, -- Rowan Tommins [IMSoP]